我正在实施一个星号服务器。
我正在使用PJSUA将wav文件发送到我的手机,并通过星号服务器。
这是我的extension.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在电话会议结束时为MACHINE
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-2squeeze。
答案 0 :(得分:0)
是 - AMD()检测到答录机是否已启动。它可能返回的可能值是: 机器|人类|不确定| HANGUP
我不知道函数的内部工作原理,但是如果你正在播放一个wav文件 - amd()可能认为它确实是一个应答机。
您的方案似乎正在提供正确的结果。您的拨号计划和Pjsua线对我来说似乎很好。
答案 1 :(得分:0)
您需要使用AMD功能中的设置。您有以下参数:
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应用程序检测到的静音,声音和声音长度模式,您应该能够确定这些参数的正确值,以达到您想要的效果。