[asterisk-users] an easy way to deal with/without leading "1" ?
M Hulber
asterisk-admin at hulber.com
Fri Mar 13 08:28:55 CDT 2009
You've had some good suggestions so far but honestly the brute force
method is not that difficult. I have been in the process of trying to
make my dialplan more concise (fewer statements) but haven't tried to do
anything about this one:
; Toll-Free
exten => _1800NXXXXXX,1,Macro(dial-avail-tf,${EXTEN})
exten => _1866NXXXXXX,1,Macro(dial-avail-tf,${EXTEN})
exten => _1877NXXXXXX,1,Macro(dial-avail-tf,${EXTEN})
exten => _1880NXXXXXX,1,Macro(dial-avail-tf,${EXTEN})
exten => _1881NXXXXXX,1,Macro(dial-avail-tf,${EXTEN})
exten => _1882NXXXXXX,1,Macro(dial-avail-tf,${EXTEN})
exten => _1888NXXXXXX,1,Macro(dial-avail-tf,${EXTEN})
exten => _800NXXXXXX,1,Macro(dial-avail-tf,1${EXTEN})
exten => _866NXXXXXX,1,Macro(dial-avail-tf,1${EXTEN})
exten => _877NXXXXXX,1,Macro(dial-avail-tf,1${EXTEN})
exten => _880NXXXXXX,1,Macro(dial-avail-tf,1${EXTEN})
exten => _881NXXXXXX,1,Macro(dial-avail-tf,1${EXTEN})
exten => _882NXXXXXX,1,Macro(dial-avail-tf,1${EXTEN})
exten => _888NXXXXXX,1,Macro(dial-avail-tf,1${EXTEN})
Benny Amorsen wrote:
> sean darcy <seandarcy2 at gmail.com> writes:
>
>
>> The regular long distance is set up so users can but don't have to
>> dial one. That's pretty easy, just one more exten statement. But it's
>> a pain dealing with all the 8xx area codes that are toll free.
>>
>
> We try to "canonicalize" dialled numbers as soon as they enter the
> system.
>
> Something like this:
>
> [fromphones]
> exten => _XXXXXXX,1,Goto(canonical,+1555${EXTEN},1)
> exten => _XXXXXXXXXX,1,Goto(canonical,+1${EXTEN},1)
> exten => _00.,1,Goto(canonical,+${EXTEN:2},1)
>
> [canonical]
> exten => _+1800XXXXXXX,1,...
> exten => _+1877XXXXXXX,1,...
>
> We don't actually have any US locations yet, so the above is made up
> from scratch without any testing.
>
> Whether to use the + to indicate a number in e164 format is a topic of
> some debate.
>
>
> /Benny
>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list