The superdial macro in the wiki will go further an allow you to specify
multiple methods to dial out (ie try FWD, then another voip provider, then
Zap, etc)
Joseph (syscon@interbaun.com) wrote:>
> On Wed, 2005-01-26 at 18:17 +1100, Duane wrote:
> > Joseph wrote:
> >
> > > Thanks Kris, I found the solution:
> > > Here is how it suppose to look like:
> >
> > You can minimise all that with a simple macro and a little pattern
> > matching, and it makes dial plans so much easier to track down
problems
> > with etc... I couldn't find anything on it, but I'm not sure
if you can
> > or can't shorten it any further something like exten =>
> > _18[00,66,77,88]. etc, but it won't parse correctly in that form
because
> > it will think they are arguments, not part of the regexp...
> >
> > [tollfree]
> >
> > exten => _1800.,1,Macro(tollfree, $)
> > exten => _1866.,1,Macro(tollfree, $)
> > exten => _1877.,1,Macro(tollfree, $)
> > exten => _1888.,1,Macro(tollfree, $)
> > exten => _3[13]800.,1,Macro(tollfree, $)
> > exten => _44[58]00.,1,Macro(tollfree, $)
> > exten => _44808.,1,Macro(tollfree, $)
> >
> > [macro-tollfree]
> >
> > exten => s,1,SetCallerID,$
> > exten =>
> > s,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r)
> > exten => s,3,Playback(invalid)
> > exten => s,4,Hangup
> > exten => s,103,Busy
>
> Thank you Duane, that is a very good suggestion (one day I have to get
> into those macros).
> Though there is a small glitch.
> When I enter:
> exten => s,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r
>
> I get:
> -- Executing Dial("SIP/11-497d",
"IAX2/xxxxx:xxxxxx@iax2.fwdnet.net/*") in new stack
> -- Called 491581:syscont6v1g7@iax2.fwdnet.net/*
> and a recording "not a valid extension"
>
> When I change it to:
> exten => s,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r
> -- Executing Dial("SIP/11-713e",
"IAX2/491581:syscont6v1g7@iax2.fwdnet.net/*s") in new
> stack
> -- Called 491581:syscont6v1g7@iax2.fwdnet.net/*s
> and busy signal
>
> Do I need to enter ARG2 as some kind of global environment?
> ARG2=EXTEN
>
> --
> #Joseph
>
> > > [tollfree]
> > > ;
> > > ; terminate toll-free no.'s via fwdnet
> > > ;
> > >
> > > ;
> > > ; US toll free access
> > > ;
> > > ; +1-800
> > > exten => _1800.,1,SetCallerID,$
> > > exten =>
> _1800.,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r)
> > > exten => _1800.,3,Playback(invalid)
> > > exten => _1800.,4,Hangup
> > > exten => _1800.,103,Busy
> > >
> > > ; +1-866
> > > exten => _1866.,1,SetCallerID,$
> > > exten =>
> _1866.,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r)
> > > exten => _1866.,3,Playback(invalid)
> > > exten => _1866.,4,Hangup
> > > exten => _1866.,103,Busy
> > >
> > > ; +1-877
> > > exten => _1877.,1,SetCallerID,$
> > > exten =>
> _1877.,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r)
> > > exten => _1877.,3,Playback(invalid)
> > > exten => _1877.,4,Hangup
> > > exten => _1877.,103,Busy
> > >
> > > ; +1-888
> > > exten => _1888.,1,SetCallerID,$
> > > exten =>
> _1888.,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r)
> > > exten => _1888.,3,Playback(invalid)
> > > exten => _1888.,4,Hangup
> > > exten => _1888.,103,Busy
> > >
> > > ;
> > > ; Netherlands toll free access
> > > ;
> > > exten => _31800.,1,SetCallerID,$
> > > exten =>
> _31800.,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r)
> > > exten => _31800.,3,Playback(invalid)
> > > exten => _31800.,4,Hangup
> > > exten => _31800.,103,Busy
> > >
> > > ;
> > > ; France toll free access
> > > ;
> > > exten => _33800.,1,SetCallerID,$
> > > exten =>
> _33800.,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r)
> > > exten => _33800.,3,Playback(invalid)
> > > exten => _33800.,4,Hangup
> > > exten => _33800.,103,Busy
> > >
> > > ;
> > > ; UK toll free access
> > > ;
> > > ; +44 500
> > > exten => _44500.,1,SetCallerID,$
> > > exten =>
> _44500.,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r)
> > > exten => _44500.,3,Playback(invalid)
> > > exten => _44500.,4,Hangup
> > > exten => _44500.,103,Busy
> > >
> > > ; +44 800
> > > exten => _44800.,1,SetCallerID,$
> > > exten =>
> _44800.,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r)
> > > exten => _44800.,3,Playback(invalid)
> > > exten => _44800.,4,Hangup
> > > exten => _44800.,103,Busy
> > >
> > > ; +44 808
> > > exten => _44808.,1,SetCallerID,$
> > > exten =>
> _44808.,2,Dial,IAX2/$:$@iax2.fwdnet.net/*$,60,r)
> > > exten => _44808.,3,Playback(invalid)
> > > exten => _44808.,4,Hangup
> > > exten => _44808.,103,Busy
> >
> > --
> >
> > Best regards,
> > Duane
> >
> > cacert.org - Free Security Certificates
> > nodedb.com - Think globally, network locally
> > sydneywireless.com - Telecommunications Freedom
> > happysnapper.com.au - Sell your photos over the net!
> > e164.org - Using Enum.164 to interconnect asterisk servers
> >
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> lists.digium.com/mailman/listinfo/asterisk-users
>
>