Daniel Varella
2009-Jan-07 14:59 UTC
[asterisk-users] How to use AMD "Answering Machine Detect" ?
Hi everybody,
Happy New Year !
I'm trying to detect if a call was answered by a machine (linke
voicemail systems) or a human.
I would like to use AMD (Answering Machine Detect) command, but
with my configuration it was not possible get there.
Follow my dialplan:
exten => _[789].,1,NoCDR
exten => _[789].,n,Dial(SIP/${EXTEN}@111,60)
exten => _[789].,n,AMD
exten => _[789].,n,NoOp(AMD Status is: ${AMDSTATUS})
exten => _[789].,n,Hangup
What is happening is when the call is answered by the other part,
Asterisk doesn't go to the next level (exten => _[789].,n,AMD). So AMD
can't verify the call.
How can I do this ? Any idea ?
Thanks in advance.
--
Daniel Varella de Oliveira
Consultor de T.I.
Cel.: +55(21)8615-6050
Linux Professional Certified
LPI000143643
Information Technology Infrastructure Library - ITIL Certified
EXIN - 944759
Dave Fullerton
2009-Jan-07 15:44 UTC
[asterisk-users] How to use AMD "Answering Machine Detect" ?
Daniel Varella wrote:> Hi everybody, > > Happy New Year ! > > I'm trying to detect if a call was answered by a machine (linke > voicemail systems) or a human. > I would like to use AMD (Answering Machine Detect) command, but > with my configuration it was not possible get there. > > Follow my dialplan: > > exten => _[789].,1,NoCDR > exten => _[789].,n,Dial(SIP/${EXTEN}@111,60) > exten => _[789].,n,AMD > exten => _[789].,n,NoOp(AMD Status is: ${AMDSTATUS}) > exten => _[789].,n,Hangup > > What is happening is when the call is answered by the other part, > Asterisk doesn't go to the next level (exten => _[789].,n,AMD). So AMD > can't verify the call. > > How can I do this ? Any idea ? > > Thanks in advance. >The Dial app will not exit until the call is completed (one or both parties hang up). You need to put what you want to happen during the call in a macro and then call the macro with the M() option to Dial (see the Dial app help text). -Dave
Daniel Varella a ?crit :> Hi everybody, > > Happy New Year ! > > I'm trying to detect if a call was answered by a machine (linke > voicemail systems) or a human. > I would like to use AMD (Answering Machine Detect) command, but > with my configuration it was not possible get there. > > Follow my dialplan: > > exten => _[789].,1,NoCDR > exten => _[789].,n,Dial(SIP/${EXTEN}@111,60) > exten => _[789].,n,AMD > exten => _[789].,n,NoOp(AMD Status is: ${AMDSTATUS}) > exten => _[789].,n,Hangup > > What is happening is when the call is answered by the other part, > Asterisk doesn't go to the next level (exten => _[789].,n,AMD). So AMD > can't verify the call. > > How can I do this ? Any idea ? >iirc AMD is for the other way around, ie detect when a call receive on your box was made by an automated machine. In your case, the extension stop at the Dial() command, except if nobody answer your call. However, maybe you can try it with the M(x) argument of Dial(): *M(*/x/*)*: Executes the macro (x) upon connect of the call (i.e. when the called party answers). IMPORTANT - The CDR 'billsecs' field is set to zero if the callee answers the call, but hangs up whilst the macro is still running (if the callee answers and the macro finishes, 'billsecs' contains the correct value).