本文介绍了Asterisk 应答机检测 (AMD) 始终将接收器检测为 MACHINE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Ubuntu 上使用 Asterisk 1.8.但是问题是我更改了 amd.conf 配置 AMD() 调用将 AMDSTATUS 检测为 MACHINE.如果有人拿起电话并说这是某某",请指导我进行 AMD 检测的正确设置,而机器拿起 10-19 分钟的消息,然后发出哔声.如果有人能帮我解决这个问题,我愿意付费.

I am using Asterisk 1.8 on Ubuntu. the problem is however I change the amd.conf configurations AMD() call detects AMDSTATUS as MACHINE. Please guide me on the right settings for AMD detection if a person picks up phone and says 'Hi this is so and so' vs. machine picks up with a 10-19 minute message followed by a beep. I am willing to pay if some one can solve this for me.

这是我的 amd.conf 设置:

Here is my amd.conf settings:

[general]
initial_silence = 2250          ; Maximum silence duration before the greeting.
                                ; If exceeded then MACHINE.
greeting = 15000                ; 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 = 25000     ; Maximum time allowed for the algorithm to decide
                                ; on a HUMAN or MACHINE
min_word_length = 300           ; Minimum duration of Voice to considered as a word
between_words_silence = 250     ; Minimum duration of silence after a word to consider
                                ; the audio what follows as a new word
maximum_number_of_words = 8     ; Maximum number of words in the greeting.
                                ; If exceeded then MACHINE
silence_threshold = 500


here is my extensions.conf setting for this extension:
[AMDTEST]
exten=> s,1,Answer()
exten=> s,n,AMD()
exten=> s,n,NoOp(${AMDSTATUS})
exten=> s,n,GotoIf($[${AMDSTATUS}=HUMAN]?humn:mach)
exten=> s,n(mach),WaitForSilence(3000,1,20)
exten=> s,n,Playback(${VOICEFILE})
exten=> s,n,Hangup()
exten=> s,n(humn),WaitForSilence(500)
exten=> s,n,Playback(${VOICEFILE})
exten=> s,n,Hangup()



Output in Asterisk debug when I picked up the call and said 'Hi its me here'
Starting SIP/Vitelity-00000f92 at AMDTEST,1400,1 failed so falling back to exten 's'
    -- Executing [s@AMDTEST:1] Answer("SIP/Vitelity-00000f92", "") in new stack
    -- Executing [s@AMDTEST:2] AMD("SIP/Vitelity-00000f92", "") in new stack
    -- AMD: SIP/Vitelity-00000f92 7702002111 (N/A) (Fmt: slin)
    -- AMD: initialSilence [2250] greeting [15000] afterGreetingSilence [2250] totalAnalysisTime [25000] minimumWordLength [300] betweenWordsSilence [250] maximumNumberOfWords [8] silenceThreshold [256] maximumWordLength [5000] 
    -- AMD: Channel [SIP/Vitelity-00000f92]. Changed state to STATE_IN_SILENCE
    -- AMD: Channel [SIP/Vitelity-00000f92]. ANSWERING MACHINE: silenceDuration:2300 initialSilence:2250
    -- Executing [s@AMDTEST:3] NoOp("SIP/Vitelity-00000f92", "MACHINE") in new stack
    -- Executing [s@AMDTEST:4] GotoIf("SIP/Vitelity-00000f92", "0?humn:mach") in new stack
    -- Goto (AMDTEST,s,5)
    -- Executing [s@AMDTEST:5] WaitForSilence("SIP/Vitelity-00000f92", "3000,1,20") in new stack
    -- Waiting 1 time(s) for 3000 ms silence with 20 timeout
    -- Exiting with 3000ms silence >= 3000ms required
    -- Executing [s@AMDTEST:6] Playback("SIP/Vitelity-00000f92", "KC_TNA") in new stack
    -- <SIP/Vitelity-00000f92> Playing 'KC_TNA.gsm' (language 'en')
  == Spawn extension (AMDTEST, s, 6) exited non-zero on 'SIP/Vitelity-00000f92'

推荐答案

我知道它的旧帖子.根据我的经验,它与initial_silence 值和total_analysis_time 值有关.设置以下内容:

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.

这篇关于Asterisk 应答机检测 (AMD) 始终将接收器检测为 MACHINE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-21 05:29