Asterisk Bridging/Answering Late Causing Failure w/AMD
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 开发者_Go百科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?
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.
精彩评论