[asterisk-users] Problems with outbound calls through VSP

Christopher Robinson chris.robinson at sayersmedia.com
Fri May 11 08:12:22 MST 2007


Bear with me this is a bit long winded.  I am having some issues making 
automated outbound calls over Broadvoice from my Asterisk 1.4.2 server.  
For reference, none of the below issues happen when I make the calls to 
VoIP phones attached to the Asterisk server.  What I am trying to do is 
call, using a .call file, out via the SIP trunk we have setup, and when 
the party picks up use AMD to detect if it's reached a human or 
machine.  If it's human then one message will be played, and if machine 
another will be played theoretically after the answering 
machine/voicemail is done playing.  By the way, I'd like to mention that 
this is not at all for spamming, or telemarketing.  This is an 
appointment reminder service.

from extensions.conf:
[mycontext]
exten => 899,1,Answer
exten => 899,2,Wait(2)
exten => 899,3,AMD
exten => 899,n,GotoIf($[${AMDSTATUS}=HUMAN]?humn:mach)
exten => 899,n(mach),WaitForSilence(2500)
exten => 899,n,Playback(were-sorry)
exten => 899,n,Hangup
exten => 899,n(humn),WaitForSilence(500)
exten => 899,n,Playback(welcome)
exten => 899,n,Hangup


The call goes out fine.  When I pick it up AMD basically locks up, 
although not exactly because as you can see below it does recognize the 
HANGUP.  However, it will not recognize my voice or dead air no matter 
how long I stay on the call to try.  If I just let my voicemail pickup 
it does the same thing...takes forever for the call to terminate.  
Again, this all works as expected when I make the call to a SIP phone 
attached to the Asterisk server.

-- Attempting call on SIP/1716XXXXXXX at sip.broadvoice.com for 
899 at mycontext:1 (Retry 1)
       > Channel SIP/sip.broadvoice.com-08bad080 was answered.
    -- Executing [899 at mycontext:1] 
Answer("SIP/sip.broadvoice.com-08bad080", "") in new stack
    -- Executing [899 at mycontext:2] 
AMD("SIP/sip.broadvoice.com-08bad080", "") in new stack
    -- AMD: SIP/sip.broadvoice.com-08bad080  (null) (Fmt: 4)
    -- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence 
[800] totalAnalysisTime [5000] minimumWordLength [100] 
betweenWordsSilence [50] maximumNumberOfWords [3] silenceThreshold [256]
    -- AMD: HANGUP

I did find a solution to this "lock up".  That was to play a bit of 
silence at any point before I actually call AMD (even before Answer works):
[mycontext]
exten => 899,1,Playback(silence/1)
exten => 899,2,Answer
....

Although I don't particularly like this solution, as I'm just patching 
the problem that I still don't understand, plus it adds a little more 
delay that confuses the called party. 

Also, when I tried this I realized yet another issue, which could be the 
underlying cause of the whole thing.  No matter what sound it is, no 
matter if I use AMD or not, the very first sound that I play results in 
a short "screech" sound before it is played.  This happens every time 
without fail.  If I were to guess, I would say that there is some data 
in the audio channel that is not audio data, and is being represented 
with that screech sound...but of course that's just a guess.

Any help would be greatly appreciated.  Below are some relevant 
configuration settings:

sip.conf:
[general]
context=testusers               ; Default context for incoming calls
allowoverlap=no                 ; Disable overlap dialing support. 
(Default is yes)
bindport=5060                   ; UDP Port to bind to (SIP standard port 
is 5060)
externip=xx.xx.xx.xx
localnet=192.168.1.0/255.255.255.0
bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds 
to all)
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
pedantic=no
register => 
7165555555 at sip.broadvoice.com:mysecret:7165555555 at sip.broadvoice.com

[sip.broadvoice.com]
allow=ulaw
type=peer
user=phone
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
fromuser=716XXXXXXX
secret=mysecret
username=716XXXXXXX
insecure=very
context=from_broadvoice
authname=716XXXXXXX
dtmf=inband
dtmfmode=inband
;Disable canreinvite if you are behind a NAT
;canreinvite=no
nat=yes






More information about the asterisk-users mailing list