VoIP: Asterisk pakai GotoIf

From OnnoCenterWiki
Jump to: navigation, 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()


Beberapa hasil dari DIALSTATUS adalah

  • ANSWER: Call is answered. A successful dial. The caller reached the callee.
  • BUSY: Busy signal. The dial command reached its number but the number is busy.
  • NOANSWER: No answer. The dial command reached its number, the number rang for too long, then the dial timed out.
  • CANCEL: Call is cancelled. The dial command reached its number but the caller hung up before the callee picked up.
  • CONGESTION: Congestion. This status is usually a sign that the dialled number is not recognised.
  • CHANUNAVAIL: Channel unavailable. On SIP, peer may not be registered.
  • DONTCALL: Privacy mode, callee rejected the call
  • TORTURE: Privacy mode, callee chose to send caller to torture menu
  • INVALIDARGS: Error parsing Dial command arguments (added for Asterisk 1.4.1, SVN r53135-53136)


Lebih Dalam

Asterisk Round Robin

OpenSIPS

OpenSIPS round robin


Referensi


Pranala Menarik

Persiapan

Script

OpenBTS 2.6

OpenBTS 2.8

Multi OpenBTS 2.8

OpenBTS 3.1.x

Ettus E110

Ettus N210

RangeNetworks

GPRS

Briker OpenBTS

FreeSWITCH OpenBTS

Power Amplifier

Lain Lain

Catatan Legal dan Pendukung

Catatan Sejarah

Dokumentasi Video

Perjuangan OpenBTS