Answering machine detection

Hello all… I need some help please. I am developing a voice broadcasting system… Can you help me with some logic to put in
extenisons.conf to detect answering machines or voice mail.

[USER]
exten => _.,1,goto(USER2,99,1)

[USER]
exten => 99,1,background(/etc/asterisk/audiomessage)
exten => 1,1,dial(SIP/15554444@terravon)
exten => 2,1,hangup
exten => i,1,dial(SIP/@terravon)

this is my current dial plan…it works fine for a live answer…not so good for answering machine…is there any logic, that works, to help fix this… I would like to play 1 wav for a live pick up and another for a voice mail…

Thanks in advance

you have a couple options here. you could use the AMD application which will try to decide if the answering party is a machine or human.

The other option you have is the WaitForSilence(X) application. This application will wait for X milliseconds of silence before moving on to the next priority in the dial plan. This is actually good for both live and machine when doing voice broadcast, because you won’t be barging over their “hello”.

To use AMD your dialplan would look something like:

exten => 1,1,dial(SIP/1555444@terravon)
exten => 1,n,Verbose(call failed...)
exten => 1,n,Hangup()

exten => ANSWER,1,AMD()
exten => ANSWER,n,GoToIf("$[${AMDSTATUS}" = "HUMAN"]?LIVE,1:MACH,1)

exten => LIVE,1,Verbose(Live Person...)
exten => LIVE,n,Hangup()

exten => MACH,1,Verbose(Answering Machine)
exten => MACH,n,Hangup()

To use WaitForSilence you would do something like:

exten => 1,1,dial(SIP/1555444@terravon)
exten => 1,n,Verbose(call failed...)
exten => 1,n,Hangup()

exten => ANSWER,1,WaitForSilence(1500)
exten => ANSWER,n,Verbose(do something...)
exten => ANSWER,n,Hangup()

i just noticed you needed to play different messages… option 1 is what you will need to use.

I’m kinda new at this, so bear with me… Will this still transfer a call on a press 1? and second i’m using asterisk 1.2.23, does amd come with this, or will I have to setup…Thank you for your help