Asterisk 桥接/应答延迟导致 AMD 失败
我的问题是,在“喂?”之后,Asterisk 似乎接电话有点太晚了。为了使 AMD 功能正常工作,即 AMD 在沉默中介入,并且该人必须再次打招呼才能知道有人在那里。
我们通过软件电话使用 IAX 对其进行了测试,并且在应答时看到或多或少相同的延迟,因此我们假设它是 Asterisk 配置。
我或多或少安装了普通的 Asterisk。我们正在通过本地提供商通过 SIP 发起出站呼叫。我使用 Java Asterisk API 的“管理器”部分告诉 Asterisk 进行调用,然后使用 Java Agi API 来处理它。
配置的 SIP 部分如下所示 (sip.conf):
[my-sip-trunk]
disallow=all
allow=ulaw
allow=alaw
allow=gsm
host=<ip to our provider>
type=peer
canreinvite=no
nat=never
我通过 Manager 发送到 Asterisk 的数据如下所示:
Channel: SIP/<phonenumberhere>@my-sip-trunk
Context: MyContext
Extension: 100
Priority: 1
Caller ID: <caller's caller ID>
在我的 extensions.conf 中,我有适当的信息——仅用于本演示的目的——只有几个命令:
[MyContext]
exten => 100,1,Answer()
exten => 100,n,Background(beep)
发生的情况是我拿起电话,有时间说“喂?”并在我讲完后不久发出蜂鸣声。蜂鸣声告诉我 AMD 何时开始列表 - 但由于我开始说话的时间已经过去了,所以它只会听到沉默。
有谁知道我在哪里/如何错误配置 Asterisk 导致这种延迟?
My problem is that Asterisk seems to be answering the phone just a bit too late after the "Hello?" for the AMD functionality to work right, i.e. the AMD comes in on the silence and the person has to say hello again for it to know there's a person there.
We've tested it using IAX via a softphone and see more or less the same delay upon answering so we're assuming it's the Asterisk configuration.
I have more or less a vanilla Asterisk install. We are initiating outbound calls via SIP through a local provider. I'm using the "Manager" portion of the Java Asterisk API to tell Asterisk to make the call and then the Java Agi API to deal with it.
The SIP portion of the config looks like this (sip.conf):
[my-sip-trunk]
disallow=all
allow=ulaw
allow=alaw
allow=gsm
host=<ip to our provider>
type=peer
canreinvite=no
nat=never
The data I send via the Manager to Asterisk looks something like this:
Channel: SIP/<phonenumberhere>@my-sip-trunk
Context: MyContext
Extension: 100
Priority: 1
Caller ID: <caller's caller ID>
In my extensions.conf I have the appropriate info and-- solely for the purpose of this demonstration-- only a couple of commands:
[MyContext]
exten => 100,1,Answer()
exten => 100,n,Background(beep)
What happens is I pick up the phone, have time to say, "Hello?" and have the beep occur shortly after I finish speaking. The beep tells me when the AMD would have started listning-- but since it's past when I started speaking it will only hear silence.
Does anyone have any ideas where/how I've misconfigured Asterisk to have this delay?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SIP 呼叫进度分析是出了名的变化无常(它基本上不起作用)。
我过去必须做的是使用 SIP 代理来分析带内音频,然后将结果传递回 Asterisk。
查看 Sangoma 呼叫分析器。
SIP call progress analysis is notoriously fickle (it basically doesn't work).
What I've had to do in the past is use a SIP proxy that analyzes the audio in-band, and then passes the result back to Asterisk.
Check out Sangoma Call Analyzer.