[asterisk-users] extending fallback numbers
Phil Frost
phil at macprofessionals.com
Mon Apr 2 19:47:42 CDT 2012
On 04/02/2012 08:35 PM, Warren Selby wrote:
> On Mon, Apr 2, 2012 at 7:05 PM, Paolo Supino <paolo.supino at gmail.com
> <mailto:paolo.supino at gmail.com>> wrote:
>
> Hi
>
> A couple of weeks ago I asekd how to setup a fallback numer and one of
> the reply I received was to se GotoIF and ${DIALSTATUS}.
> I succeeded in making it work for a single fallback number (i.e. the
> operator), but I want to extend it in the following manner:
>
> 2000-2099 -> fallback to 2000
> 2100-2199 -> fallback to 2100
>
>
>
> The simplest way is to just use pattern matching and multiple Dial
> statements in consecutive order, like so:
>
> exten => _20XX,1,Dial(SIP/${EXTEN},30)
> exten => _20XX,n,Dial(SIP/2000,30)
It's also worth noting that you can provide priority 1 in one extension,
and then fall through to more general priorities in a more general
context. For example,
exten => 2011,1,NoOp(2011 ${EXTEN})
exten => _20XX,2,NoOp(_20XX ${EXTEN})
More information about the asterisk-users
mailing list