Asterisk DialStatus Channel Varriable
eduguru 1 Comment ${ARG3}, ${ARG4}) exten => s, 1, 1) exten => s-CANCEL, 1) exten => s-NOANSWER, 2, arg2, Asterisk channel variable DIALSTATUS Contains a text string signifying result of the last dial attempt: ANSWER: Call is answered. A successful dial. The caller reached the callee. BUSY: Busy signal. T, Asterisk DialStatus Channel Varriable, Busy exten => s-CHANUNAVAIL, callee chose to send caller to torture menu INVALIDARGS: Error parsing Dial command arguments (added for Asterisk 1.4.1, callee rejected the call TORTURE: Privacy mode, Congestion exten => _s-., Congestion exten => s-, Congestion exten => s-CANCEL, Congestion The following is an example of a local Zap channel callout with SIP failover (ex. Zap channel is in use) [macro-localcallout] exten => s, Dial() returns DIALSTATUS=CONGESTION for pretty much every call setup problem. The reason for this is that Dial() is used for multiple protocols (Zap, Dial(${ARG1}, Dial(${ZAP/1/${ARG1}, Dial(SIP/sippeer/${LOCALAREACODE}${ARG1}, g, Goto(s-${DIALSTATUS}, GotoIf($["${DIALEDTIME}" = "0"]?here) exten => s-NOANSWER, GotoIf($["${DTIME}" = "0"]?here) exten => s-NOANSWER, Hangup exten => s-BUSY, Hangup exten => s-CONGESTION, Hangup exten => s-NOANSWER, IAX etc.) and so it is limited to the lowest common denominator and is unable to return the protocol specific information (e.g., in sip.conf or iax.conf). CONGESTION "Congestion" is somewhat misleading. Unfortunately at this time (2007-05-17), n, n(here), Need failover for "${ARG1}") exten => s-BUSY, Need failover for "${ARG1}") exten => s-CONGESTION, next line is not perfect! ;exten => s-NOANSWER, NoOp( Dial Status: ${DIALSTATUS}) exten => s, peer may not be registered. DONTCALL: Privacy mode, see example in goto documentation. Note: To obtain useful DIALSTATUS information when dialing a peer the peer's definition must contain qualify=yes (e.g., Set(DIALSTART=${EPOCH}) ;exten => s, Set(DTIME=$[${EPOCH} - ${DIALSTART}]) watch out DIALEDTIME can also be empty, SetCallerId(${CALLERIDNUM}) exten => s-CHANUNAVAIL, sip, SIP 404 response) ., SVN r53135-53136) The dial status may be used in the dialplan to control program flow, T), T) exten => s, 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 t, This macro is an example of how failover for two or more outgoing trunks can be managed [macro-safedial] exten => s, Verbose(1
Asterisk channel variable DIALSTATUS Contains a text string signifying result of the last dial attempt: ANSWER: Call is answered. A
Read more