AMD With Analog Lines – DIALSTATUS Empty

Home » Asterisk Users » AMD With Analog Lines – DIALSTATUS Empty
Asterisk Users 2 Comments

Hello,

I would like to use AMD on outgoing calls using analog line. I tested with SPA3102 and cisco2811 as gw and asterisk 1.8.26.1 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.

[myMacro]

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 call is going out from the gw (cisco or linksys) and before called party answered. DIALSTATUS is empty (should be ANSWER), AMDSTATUS=NOTSURE and AMDCAUSE=TOOLONG-5000 which seems OK as DIALSTATUS isn’t reliable.

The same dialplan using a SIP trunk is working as expected.

So question is, why, when using analog line, I dont get the right behavior.

Thanks for any hint

2 thoughts on - AMD With Analog Lines – DIALSTATUS Empty

  • Analog lines don’t have a reliable way to know when the far end actually answers. Polarity reversals could signal when the far end actually answers, but it isn’t normally available or standardized. Thus, the line is considered answered when dialing is complete.

    Richard