[asterisk-users] Matching *, + and # in the dialplan

John Todd jtodd at digium.com
Thu Oct 16 23:31:53 CDT 2008


At 5:46 PM +0200 2008/10/16, Olivier wrote:
>
>Is Incomplete() application an acceptable work around for ISN ?
>

It is impossible to determine the full sequence of digits for an ISN 
number ahead of time (well, I shouldn't say "impossible" because one 
could create a really nasty hack...) because the number of digits 
isn't known until the user indicates they are done dialing.  To 
determine if the subscriber and/or the ITAD are valid, one must 
perform a lookup and possibly a connection attempt to the remote 
system for determination.

Both the subscriber number (the stuff to the left of the "*") and the 
ITAD number (the stuff to the right of the "*") are not bounded by a 
particular pattern.  Therefore, it is not reasonable to create 
regexps other than "does this string contain at least one but maybe 
more digits, followed by the "*" sign, followed by at least one but 
maybe more digits".

So, 1234*256 is a valid ISN sequence, as is 12345*2567.  (Though only 
the first one of the two is actually active at the moment.)

See http://www.freenum.org/ for more details on what makes up an ISN. 
It's free to participate, and Asterisk incorporates ISN-style dialing 
as a default in the ENUMLOOKUP routines.  Accepting inbound calls is 
easy as well - it's just SIP inbound calling, no magic there.

JT


-- 
John Todd
jtodd at digium.com        +1-256-428-6083
Asterisk Open Source Community Director



More information about the asterisk-users mailing list