Asterisk Answering machine detection (AMD) always detects receiver as MACHINE

為{幸葍}努か 提交于 2019-12-03 22:48:57
Vinnie

I know its bit old post. As per my experience, It is related to the initial_silence value and total_analysis_time value. Set the following:

 initial_silence=5100
 total_analysis_time=5000

That allows your algorithm to detect the answer machine in a right way.

you are very right, problem is I am not that experienced with Asterisk AMD. But after a lot of reading and trial and error I got this working fine ( atleast 80%). Most critical thing was adding background command before calling AMD(). key factors : 1. Make sure to ahve Initial silence setting atleast 3-4 seconds ( humans respond faster than machines) 2. Make sure you give enough time for greeting ( typical human greeting finishes in 2-3 seconds) 3. fine tune wait for silence after detecting machine based on experience

Here is the extension config:

     [AMDTEST]
exten=> s,1,Answer()
exten=> s,2,Background(en_US/silence/1)
exten=> s,n,AMD()
exten=> s,n,NoOp(${AMDSTATUS})
exten=> s,n,GotoIf($[${AMDSTATUS}=HUMAN]?humn:mach)
exten=> s,n(mach),WaitForSilence(4500,2,16)
exten=> s,n,Playback(${VOICEFILE})
exten=> s,n,Hangup()
exten=> s,n(humn),Playback(${VOICEFILE})
exten=> s,n,Hangup()</code>

Amd.conf:
[general]
initial_silence = 4000      ; Maximum silence duration before the greeting.
                ; If exceeded then MACHINE.
greeting = 9000         ; Maximum length of a greeting. If exceeded then
 MACHINE.
after_greeting_silence = 2250   ; Silence after detecting a greeting.
                ; If exceeded then HUMAN
total_analysis_time = 15000 ; Maximum time allowed for the algorithm to deci
de
                ; on a HUMAN or MACHINE
min_word_length = 100       ; Minimum duration of Voice to considered as a w
ord
between_words_silence = 50  ; Minimum duration of silence after a word to co
nsider
                ; the audio what follows as a new word
maximum_number_of_words = 5 ; Maximum number of words in the greeting.
                ; If exceeded then MACHINE
silence_threshold = 256

You detection reason is described by this line:

ANSWERING MACHINE: silenceDuration:2300 initialSilence:2250

So you have increase initial sielence param or maybe ajust treshhold. It is almost imposible to got correct answer without recordin of call.

I want to share the observation. If you use call files - you need to have Background after Answer in your "IN LEG", otherwise AMD will not work

[CALLFILES-IN]
exten=> s,1,Answer()
exten=> s,2,Background(en/silence/1)
exten=> s,n,AMD()
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!