[Asterisk-Dev] answering machine detection

Richard Lyman pchammer at dynx.net
Fri Mar 4 14:02:13 MST 2005


Scott Stingel wrote:
> Preston-
> 
> You might want to try just using the length of the answer as a guide to 
> whether it's a person or machine, and run your own tests.  I tried it a 
> lot recently for an outbound customer, and it worked very well.
> 
> I think you'll find that greetings over about 2.5 seconds are very 
> likely an answering machine.
> 
> Also, you can do this with the standard Background application, just 
> playing 30 seconds of silence for the background.  This application sets 
> a variable which allows you to determine how long it was before the 
> speech occurred.  Something like this in your outbound application:
> 
> ....your own stuff......., then:
> 
> exten => s,4,BackgroundDetect(24SecSilence|1200|80|15000)   <- using the 
> recording of silence
> 
> ; Test for no voice - TALK_DETECTED will not be defined:
> exten => s,5,GotoIf($[BLAH${TALK_DETECTED} = BLAH]?40:6)
> 
> ; Check length of voice detected:
> exten => s,6,Noop,${TALK_DETECTED}
> exten => s,7,GotoIf($[${TALK_DETECTED} > 2500]?31:21)
> 
> ; If greeting <= 2.5 seconds, it's a person
> exten => s,21,....something...
> exten => s,22,....something...
> exten => s,23,Goto(s,40)
> 
> ; If greeting > 2.5 seconds, it's an answering machine
> exten => s,31,.....something....
> exten => s,32,.....something...
> 
> exten => s,40,Playback(Goodbye)
> exten => s,41,Hangup
> 

even easier, have a talk extension.

exten => 1,1,BackgroundDetect(nothing|500|300|1050)
exten => 1,2,Hangup
exten => talk,1,Queue(op_ready|tn|||2)
exten => talk,2,Playback(vm-isunavail)
exten => talk,3,Hangup


nothing is a file of x secs of silence.  there other params are 
for a short non-silence like 'hello' (adjust for your usage).




More information about the asterisk-dev mailing list