VoIP: Asterisk pakai GotoIf

From OnnoWiki
Revision as of 21:14, 4 February 2014 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Sumber: http://www.spinics.net/lists/asterisk/msg157160.html

exten => _7NXXXXXX,1,Dial(SIP/7780${EXTEN:1}@pstn-5665,60,tr)
exten => _7NXXXXXX,n,NoOp(DialStatus="${DIALSTATUS}")
exten => _7NXXXXXX,n,GotoIf($[$["${DIALSTATUS}" = "BUSY"] | $["${DIALSTATUS}" = "CONGESTION"]]?line2)
exten => _7NXXXXXX,n,Hangup()
exten => _7NXXXXXX,n(line2),Dial(SIP/9780${EXTEN:1}@pstn-1270,60,tr)
exten => _7NXXXXXX,n,NoOp(DialStatus="${DIALSTATUS}")
exten => _7NXXXXXX,n,Hangup()

atau

exten => _08.,1,Dial(SIP/${EXTEN}@gw-ext1,60,tr)
exten => _08.,n,NoOp(DialStatus="${DIALSTATUS}")
exten => _08.,n,GotoIf($[$["${DIALSTATUS}" = "BUSY"] | $["${DIALSTATUS}" = "CONGESTION"]]?line2)
exten => _08.,n,Hangup()
exten => _08.,n(line2),Dial(SIP/${EXTEN}@gw-ext2,60,tr)
exten => _08.,n,NoOp(DialStatus="${DIALSTATUS}")
exten => _08.,n,Hangup()