DP+MySQL: AMD-Answering Machine Detection

    版本為 03:26, 27 Dec 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    AMD - 這是一個內建 Asterisk 的功能,可用來偵測接電話的對方是語音或人聲。

    Dialplan 範例

    [amd-test]
    exten => 9970,1,Noop(-- AMD Testing Start --)
     same => n,Background(beep)
     same => n,AMD()
     same => n,Noop(Detected: AMDSTATUS is ${AMDSTATUS})
     same => n,Goto(Status-${AMDSTATUS})
     same => n(Status-HUMAN),Noop(When AMDSTATUS  is <HUMAN>)
    same => n,
    WaitForSilence(2500)
    same => n,Playback(
    message-when-machine) same => n,Hangup same => n(Status-MACHINE),Noop(When AMDSTATUS is <MACHINE>)
    same => n,Hangup same => n(Status-NOTSURE),Noop(When AMDSTATUS is <NOTSURE>)
    same => n,Hangup  same => n(Status-HANGUP),Noop(When AMDSTATUS is <HANGUP>)
    same => n,Hangup

    amd.conf

    ;
    ; Answering Machine Detection Configuration
    ;
    
    [general]
    initial_silence = 2500          ; Maximum silence duration before the greeting.
                                    ; If exceeded then MACHINE.
    greeting = 1500                 ; Maximum length of a greeting. If exceeded then MACHINE.
    after_greeting_silence = 800    ; Silence after detecting a greeting.
                                    ; If exceeded then HUMAN
    total_analysis_time = 5000      ; Maximum time allowed for the algorithm to decide
                                    ; on a HUMAN or MACHINE
    min_word_length = 100           ; Minimum duration of Voice to considered as a word
    between_words_silence = 50      ; Minimum duration of silence after a word to consider
                                    ; the audio what follows as a new word
    maximum_number_of_words = 3     ; Maximum number of words in the greeting.
                                    ; If exceeded then MACHINE
    silence_threshold = 256   ;silence threshold is how loud silence is.
    

    Tips:

    • silence_threshold: 這是用來辨識silence的音量基準值,只要偵測到聲音低於這個值,就視為 silence。通常這個值僅可能的低,對於有些手機的用戶,因為手機的噪音會比較大,可能要稍微將它調高。
    Powered by MindTouch Core