[Asterisk-Users] help on dial plan
Patrick
asterisk at puzzled.xs4all.nl
Sun Feb 12 08:38:55 MST 2006
On Sun, 2006-02-12 at 10:05 -0500, Wooi Koay wrote:
> The following is my dialplan for outgoing international call. What I want are:
>
> - when people dial 9011604xxxxxxx , 9011605xxxxxxx, 90114411xxxxxxx,
> 90114421xxxxxxx, use voipstunt to dial out
> - otherwise, use my pstn to dial out.
>
> What I've found is when i dial 9011604xxxxxxx , 9011605xxxxxxx,
> 90114411xxxxxxx, 90114421xxxxxxx, it always use the pstn to dial out.
> Anything wrong with my dial plan?
>
> Thanks!!
>
>
> [outbound-oversea]
> exten => _9011604.,1,Macro(outgoingcall3,${VOIPSTUNT},4) ;penang
> exten => _9011605.,1,Macro(outgoingcall3,${VOIPSTUNT},4) ;perak
> exten => _90114411.,1,Macro(outgoingcall3,${VOIPSTUNT},4) ;uk landline
> exten => _90114421.,1,Macro(outgoingcall3,${VOIPSTUNT},4) ;uk landline
> exten => _9011.,1,Macro(outgoingcall,${OUTBOUNDTRUNK})
Asterisk evalutates your extens from least to most significant. So the
_9011. is always selected first. To overcome this you could do:
[outbound-oversea]
exten => _9011604.,1,Macro(outgoingcall3,${VOIPSTUNT},4) ;penang
exten => _9011605.,1,Macro(outgoingcall3,${VOIPSTUNT},4) ;perak
exten => _90114411.,1,Macro(outgoingcall3,${VOIPSTUNT},4) ;uk landline
exten => _90114421.,1,Macro(outgoingcall3,${VOIPSTUNT},4) ;uk landline
include => outbound-oversea-zap-backup
[outbound-oversea-zap-backup]
exten => _9011.,1,Macro(outgoingcall,${OUTBOUNDTRUNK})
If you do "show dialplan outbound-oversea" in the Asterisk CLI than you
will see the order.
For more info see:
http://www.voip-info.org/wiki/index.php?page=Asterisk+config
+extensions.conf+sorting
Regards,
Patrick
More information about the asterisk-users
mailing list