FILTER(erlaubte Zeichen
,String
)
; nur die Zeichen 0123456789 in ${cdrnum} zulassen: exten => 123,1,Set(foo=${FILTER(0123456789,${cdrnum})})
| | | 1.4 |————————| 1.6 |————————
-= Info about function 'FILTER' =-
[Syntax]
FILTER(<allowed-chars>|<string>)
[Synopsis]
Filter the string to include only the allowed characters
[Description]
Not available
--- in Asterisk 1.4
+++ in Asterisk 1.6
@@ -1,10 +1,15 @@
-= Info about function 'FILTER' =-
[Syntax]
- FILTER(<allowed-chars>|<string>)
+ FILTER(<allowed-chars>,<string>)
[Synopsis]
Filter the string to include only the allowed characters
[Description]
- Not available
+ Permits all characters listed in <allowed-chars>, filtering all others out.
+ In addition to literally listing the characters, you may also use ranges of
+ characters (delimited by a '-'), as well as hexadecimal characters started
+ with a \x (i.e. \x20) and octal characters started with \0 (i.e. \040).
+ Also, \t, \n, and \r are recognized. If you want a literal '-' character,
+ simply prefix it with a '\'