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

Duane duane at e164.org
Wed Jan 26 00:17:53 MST 2005


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

> [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

"I do not try to dance better than anyone else.
	I only try to dance better than myself."



More information about the asterisk-users mailing list