<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 28, 2014 at 4:01 AM, Administrator TOOTAI <span dir="ltr"><<a href="mailto:admin@tootai.net" target="_blank">admin@tootai.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
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.<br>
<br>
What I did: dial is done like exten => s,n,Dial(SIP/<IP gw>/<dialed number>,,M(myMacro)), which tell Asterisk to execute myMacro when the call is answered by calling party.<br>
<br>
[myMacro]<br>
<br>
exten => s,1,NoOP(Executed when call is answered)<br>
same => n,AMD()<br>
same => n,NoOp(Dial status=${DIALSTATUS})<br>
same => n,NoOp(AMD status=${AMDSTATUS} cause=${AMDCAUSE})<br>
same => n,MacroExit()<br>
<br>
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.<br>
<br>
The same dialplan using a SIP trunk is working as expected.<br>
<br>
So question is, why, when using analog line, I dont get the right behavior.<br>
<br>
Thanks for any hint<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>Analog lines don't have a reliable way to know when the far end actually answers. Polarity<br>reversals could signal when the far end actually answers, but it isn't normally available or<br>
standardized. Thus, the line is considered answered when dialing is complete.<br><br>Richard<br></div></div><br></div></div>