Strict Pattern Matching In Asterisk
One of the simpler ways to mitigate the problem of having provided someone with a method to place calls out of your ITSP in a place where you didn't expect to allow it is with a strict pattern matching that does not utilize the period (.) or bang (!) characters to match on one-or-more characters or zero-or-more characters (respectively). To give an example that only accepts three digit extensions, we could use the following pattern match: exten => _XXX,n,Dial(SIP/${EXTEN}) In this way, we have minimized our impact because we're not allowing anything other than the numbers zero through nine. But in some cases we really do need to handle variable pattern matches, such as when dialing international numbers or when we want to handle something like a SIP URI. In this case, we'll need to utilize the FILTER() dialplan function.









