AMD With Analog Lines - DIALSTATUS Empty



I would like to use AMD on outgoing calls using analog line. I tested with SPA3102 and cisco2811 as gw and asterisk as well as 11.8.1 Other end is analog number behind another cisco/asterisk, also tested calling a mobile number with the same result.

What I did: dial is done like exten => s,n,Dial(SIP//,,M(myMacro)), which tell Asterisk to execute myMacro when the call is answered by calling party.


exten => s,1,NoOP(Executed when call is answered) same => n,AMD() same => n,NoOp(Dial status=${DIALSTATUS}) same => n,NoOp(AMD status=${AMDSTATUS} cause=${AMDCAUSE}) same => n,MacroExit()

Problem is that [myMacro] is executed as soon as the…

Asterisk Users 1.6 years ago 2 Answers

extending fallback numbers


Hi A couple of weeks ago I asekd how to setup a fallback numer and one of
the reply I received was to se GotoIF and ${DIALSTATUS}.
I succeeded in making it work for a single fallback number (i.e. the
operator), but I want to extend it in the following manner: 2000-2099 -> fallback to 2000
2100-2199 -> fallback to 2100
2200-2299 -> fallback to 2200
2300-2399 -> fallback to 2300 and so on...
How do I implement such a configuration in a dialplan? TIA

Asterisk Users 3.6 years ago 5 Answers

Asterisk Dialstatus


The DIALSTATUS channel variable is created when you attempt to connect to another device or endpoint and bridge the call with the Dial Application. It contains the status of the call reflected in one of the following values:

  • BUSY
  • DONTCALL - For the Privacy and Screening Modes. Will be set if the called party chooses to send the calling party to the 'Go Away' script.
  • TORTURE - For the Privacy and Screening Modes. Will be set if the called party chooses to send the calling party to the 'torture' script.

Dialplan Basics 3.8 years ago 0 Answers

Asterisk Dialstatus


Hello, I'm using AGI scripting with asterisk and need to execute certain commands just after Dial(). But once dial command is executed, further commands/instructions are ignored.

$dialstatus = $agi -> get_variable("DIALSTATUS");


    do something.......
thanks, Kamlesh

Asterisk Users 3.9 years ago 4 Answers

Why **CONGESTION** not *****NOANSWER****** ?


Hi List, I have a DID number which is routed to my production server. Problem is
that when I dial that DID number from my production number then it's gives
DIALSTATUS to CONGESTION if I don't pick the calls. As per the asterisk it
should reply NO ANSWER. *extensions.conf *:-
exten => 08723310476,1,Dial(SIP/2218)
same => n,NoOp(**${DIALSTATUS}**)
same => n,ExecIf($['${DIALSTATUS}'='CHANUNAVAIL']?NoOp(Channel
unavailable. On SIP, peer may not be registered.))
same => n,ExecIf($['${DIALSTATUS}'='BUSY']?noop(Busy signal. The
dial command reached its number but the number is busy.))
same => n,ExecIf($['${DIALSTATUS}'='ANSWER']?noop(Call is answered.

Asterisk Users 3.9 years ago 2 Answers