[svn-commits] tringenbach: branch 1.4 r260887 - /branches/1.4/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue May 4 12:41:03 CDT 2010


Author: tringenbach
Date: Tue May  4 12:40:59 2010
New Revision: 260887

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=260887
Log:
Fix FILTER() examples to work in 1.4

Review: https://reviewboard.asterisk.org/r/644/

Modified:
    branches/1.4/README-SERIOUSLY.bestpractices.txt

Modified: branches/1.4/README-SERIOUSLY.bestpractices.txt
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/README-SERIOUSLY.bestpractices.txt?view=diff&rev=260887&r1=260886&r2=260887
==============================================================================
--- branches/1.4/README-SERIOUSLY.bestpractices.txt (original)
+++ branches/1.4/README-SERIOUSLY.bestpractices.txt Tue May  4 12:40:59 2010
@@ -121,7 +121,7 @@
 
 [incoming]
 exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
-exten => _X.,n,Dial(SIP/${FILTER(0-9,${EXTEN})})
+exten => _X.,n,Dial(SIP/${FILTER(0123456789,${EXTEN})})
 exten => _X.,n,Hangup()
 
 Note how we've wrapped the ${EXTEN} channel variable with the FILTER() function
@@ -135,7 +135,7 @@
 
 [incoming]
 exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
-exten => _X.,n,Set(SAFE_EXTEN=${FILTER(0-9,${EXTEN})})
+exten => _X.,n,Set(SAFE_EXTEN=${FILTER(0123456789,${EXTEN})})
 exten => _X.,n,Dial(SIP/${SAFE_EXTEN})
 exten => _X.,n,Hangup()
 
@@ -146,7 +146,7 @@
 
 [incoming]
 exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
-exten => _X.,n,Set(SAFE_EXTEN=${FILTER(0-9,${EXTEN})})
+exten => _X.,n,Set(SAFE_EXTEN=${FILTER(0123456789,${EXTEN})})
 exten => _X.,n,GotoIf($[${EXTEN} != ${SAFE_EXTEN}]?error,1)
 exten => _X.,n,Dial(SIP/${SAFE_EXTEN})
 exten => _X.,n,Hangup()
@@ -161,7 +161,7 @@
 
 [incoming]
 exten => _[0-9a-zA-Z].,1,Verbose(2,Incoming call to extension ${EXTEN})
-exten => _[0-9a-zA-Z].,n,Dial(SIP/${FILTER(. at 0-9a-zA-Z,${EXTEN})
+exten => _[0-9a-zA-Z].,n,Dial(SIP/${FILTER(. at 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,${EXTEN})
 exten => _[0-9a-zA-Z].,n,Hangup()
 
 Of course the FILTER() function doesn't check the formatting of the incoming




More information about the svn-commits mailing list