Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sip 星号:检测患有AMD的机器或人_Sip_Asterisk_Pjsip - Fatal编程技术网

Sip 星号:检测患有AMD的机器或人

Sip 星号:检测患有AMD的机器或人,sip,asterisk,pjsip,Sip,Asterisk,Pjsip,我正在实现一个星号服务器 我正在使用PJSUA通过asterisk服务器向手机发送wav文件 这是我的扩展名.conf [appel-sortant] ; Initialisation

我正在实现一个星号服务器

我正在使用PJSUA通过asterisk服务器向手机发送wav文件

这是我的扩展名.conf

[appel-sortant] ; Initialisation                                                                                                                                                                                                             
exten => _X.,1,Set(LOOP=0)
exten => _X.,2,Set(MAX=3)                                                                                                                                                                                                  
exten => _X.,n,Set(ASTREINTE=${EXTEN})
exten => _X.,n,Goto(astreinte,${EXTEN},10)                                                                                                                                                                               
exten => _X.,500,Hangup

[astreinte]
exten => _X.,10,Dial(SIP/${ASTREINTE}@forfait-ovh,20,gS(10))
exten => _X.,n,AMD()
exten => _X.,n,NoOp(${DIALSTATUS}) ; Here got ANSWER status
exten => _X.,n,NoOp(${AMDSTATUS}) ; Here got MACHINE or NOTSURE
exten => _X.,n,Hangup
我的问题是:

1/当我在从PJSUA发送wav文件时拨打我的电话号码时,AMDSTATUS在通话结束时处于机器状态

2/如果我在没有wav文件的情况下使用pjsua调用,我会得到一个AMDSTATUS=NOTSURE

AMD()是检测电话答录机还是呼叫机

这是我的Pjsua行文件:

pjsua --null-audio --local-port=5061 --id sip:username@192.168.X.X --registrar sip:192.168.X.X --realm * --username username --password password --auto-play --play-file=./sounds/sound.wav sip:0123456789@192.168.X.X
我目前使用的是星号1.6.2.9-2squeze。

是-AMD()检测是否有电话答录机接听。它可能返回的值包括: 机器|人|不确定|挂断

我不知道该函数的内部工作原理,但如果您正在播放wav文件,amd()可能会认为它确实是一台应答机


您的场景似乎提供了正确的结果。您的拨号计划和Pjsua线路对我来说似乎很好。

您需要在函数中进行设置。您具有以下参数:

AMD([initialSilence[,greeting[,afterGreetingSilence[,totalAnalysis Time[,miniumWordLength[,betweenWordSilence[,maximumNumberOfWords[,silenceThreshold[,maximumWordLength]]]]]]]]])

initialSilence - Is maximum initial silence duration before greeting.
    If this is exceeded set as MACHINE
greeting - is the maximum length of a greeting.
    If this is exceeded set as MACHINE
afterGreetingSilence - Is the silence after detecting a greeting.
    If this is exceeded set as HUMAN
totalAnalysis Time - Is the maximum time allowed for the algorithm
    to decide HUMAN or MACHINE
miniumWordLength - Is the minimum duration of Voice considered to be a word
betweenWordSilence - Is the minimum duration of silence after a word to consider the audio that follows to be a new word
maximumNumberOfWords - Is the maximum number of words in a greeting
    If this is exceeded set as MACHINE
silenceThreshold - How long do we consider silence
maximumWordLength - Is the maximum duration of a word to accept.
    If exceeded set as MACHINE
根据pjsua应用程序检测到的静音模式、声音和声音长度,您应该能够确定这些参数的正确值,以获得所需的结果