[asterisk-users] can I get a little criticism?

Alexander Benaguev abenaguev at gmail.com
Mon Aug 11 18:14:57 CDT 2008


dear list

I'm very new in telephony and asterisk especial. so, it would be great
if somebody see at my dialplan. it works (except e1 which is untested at
this day), but I think it's not perfect. thanks

alexander

p.s. in Russia national prefix is "8" and international "810"

------------/etc/asterisk/dialplan-------------------------
[phones]
;send to westcall e1
exten => _89.,1,Goto(westcall,${EXTEN},1) ;spb cellular like 911, 921 etc.
exten => _ZXXXXXX,1,Goto(westcall,${EXTEN},1) ;ptsn numbers
exten => _00XX,1,Goto(westcall,${EXTEN:2},1) ;01, 02, 03 etc.
;send to sipnet
exten => _8N.,1,Goto(sipnet,7${EXTEN:1},1) ;national
exten => _810X.,1,Goto(sipnet,${EXTEN:3},1) ;international
;send to internal
exten => _01XX,1,Goto(internal,${EXTEN},1) ;internal numbers

[internal]
;0100 fxs1
exten => 0100,1,Dial(ZAP/32,30,rtT)
exten => 0100,n,Hangup()
;0101 sip
exten => 0101,1,Dial(SIP/0101,30,rtT)
exten => 0101,n,Hangup()
;0102 sip
exten => 0102,1,Dial(SIP/0102,30,rtT)
exten => 0102,n,Hangup()
;0103 sip
exten => 0103,1,Dial(SIP/0103,30,rtT)
exten => 0103,n,Hangup()
;0104 sip
exten => 0104,1,Dial(SIP/0104,30,rtT)
exten => 0104,n,Hangup()
;0105 sip
exten => 0105,1,Dial(SIP/0105,30,rtT)
exten => 0105,n,Hangup()


[westcall]
;try channels from 1 to 10 or hang
exten => _X.,1,Set(CHAN=1)
exten => _X.,n(trychan),Dial(ZAP/${CHAN}/${EXTEN})
exten => _X.,n,Set(CHAN=$[${CHAN} + 1])
exten => _X.,n,GotoIf($[${CHAN} <= 10]?trychan:bye)
exten => _X.,n(bye),Congestion()
exten => _X.,n,Hangup()

[sipnet]
;see users.conf
exten => _Z.,1,Dial(SIP/sipnet/${EXTEN})

[incoming]
;actually only e1 incomings
exten => s,1,Queue(mainq,rtT) ;strategy = roundrobin
exten => s,n,Congestion()
exten => s,n,Hangup()




More information about the asterisk-users mailing list