[Asterisk-Users] Tall free number via FWD over IXA2

Joseph syscon at interbaun.com
Wed Jan 26 09:26:51 MST 2005


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})
> exten => _1866.,1,Macro(tollfree, ${EXTEN})
> exten => _1877.,1,Macro(tollfree, ${EXTEN})
> exten => _1888.,1,Macro(tollfree, ${EXTEN})
> exten => _3[13]800.,1,Macro(tollfree, ${EXTEN})
> exten => _44[58]00.,1,Macro(tollfree, ${EXTEN})
> exten => _44808.,1,Macro(tollfree, ${EXTEN})
> 
> [macro-tollfree]
> 
> exten => s,1,SetCallerID,${FWDCIDNAME}
> exten => 
> s,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${ARG2},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/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${ARG2},60,r

I get:
-- Executing Dial("SIP/11-497d", "IAX2/xxxxx:xxxxxx at iax2.fwdnet.net/*") in new stack
-- Called 491581:syscont6v1g7 at iax2.fwdnet.net/*
and a recording "not a valid extension"

When I change it to:
exten => s,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r
-- Executing Dial("SIP/11-713e", "IAX2/491581:syscont6v1g7 at iax2.fwdnet.net/*s") in new stack
-- Called 491581:syscont6v1g7 at 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,${FWDCIDNAME}
> > exten => _1800.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
> > exten => _1800.,3,Playback(invalid)
> > exten => _1800.,4,Hangup
> > exten => _1800.,103,Busy
> > 
> > ; +1-866
> > exten => _1866.,1,SetCallerID,${FWDCIDNAME}
> > exten => _1866.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
> > exten => _1866.,3,Playback(invalid)
> > exten => _1866.,4,Hangup
> > exten => _1866.,103,Busy
> > 
> > ; +1-877
> > exten => _1877.,1,SetCallerID,${FWDCIDNAME}
> > exten => _1877.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
> > exten => _1877.,3,Playback(invalid)
> > exten => _1877.,4,Hangup
> > exten => _1877.,103,Busy
> > 
> > ; +1-888
> > exten => _1888.,1,SetCallerID,${FWDCIDNAME}
> > exten => _1888.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
> > exten => _1888.,3,Playback(invalid)
> > exten => _1888.,4,Hangup
> > exten => _1888.,103,Busy
> > 
> > ;
> > ; Netherlands toll free access
> > ;
> > exten => _31800.,1,SetCallerID,${FWDCIDNAME}
> > exten => _31800.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
> > exten => _31800.,3,Playback(invalid)
> > exten => _31800.,4,Hangup
> > exten => _31800.,103,Busy
> > 
> > ;
> > ; France toll free access
> > ;
> > exten => _33800.,1,SetCallerID,${FWDCIDNAME}
> > exten => _33800.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},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,${FWDCIDNAME}
> > exten => _44500.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
> > exten => _44500.,3,Playback(invalid)
> > exten => _44500.,4,Hangup
> > exten => _44500.,103,Busy
> > 
> > ; +44 800
> > exten => _44800.,1,SetCallerID,${FWDCIDNAME}
> > exten => _44800.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
> > exten => _44800.,3,Playback(invalid)
> > exten => _44800.,4,Hangup
> > exten => _44800.,103,Busy
> > 
> > ; +44 808
> > exten => _44808.,1,SetCallerID,${FWDCIDNAME}
> > exten => _44808.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
> > exten => _44808.,3,Playback(invalid)
> > exten => _44808.,4,Hangup
> > exten => _44808.,103,Busy
> 
> -- 
> 
> Best regards,
>   Duane
> 
> http://www.cacert.org - Free Security Certificates
> http://www.nodedb.com - Think globally, network locally
> http://www.sydneywireless.com - Telecommunications Freedom
> http://happysnapper.com.au - Sell your photos over the net!
> http://e164.org - Using Enum.164 to interconnect asterisk servers
> 





More information about the asterisk-users mailing list