1
votes

Hopefully someone can help me out, I've been breaking my head for a few days and have read a ton of threads on the internet to no avail.

My ultimate goal is to use the AMI to originate a call and pass it off to a script. Unfortunately I cannot get originate to work so I have simplified the flow to try and debug the issue. I am trying to just originate a call from the dialplan now and play a sound file. After a short time the call gets cancelled and the SIP client that originated the call gets a declined.

This same configuration works perfectly exactly as is using the Dial command instead of the Originate command.

Below I am including a SIP debug from the console of the originate and the relevant sip.conf bits. The sever is using Asterisk v1.8.32.3.

All IPs and phone numbers have been changed to protect the innocent.

  • 111.111.111.111 (Asterisk Server IP)
  • 222.222.222.222 (SIP Termination Provider)
  • 333.333.333.333 (Originating SIP Client)

sip.conf

[vitel-outbound]
type=friend
dtmfmode=auto
host=222.222.222.222
allow=all
canreinvite=no
nat=yes
trustrpid=yes
sendrpid=yes

[front4]
type=friend
context=outgoing-calls
host=dynamic
defaultuser=front4
secret=password
nat=yes
qualify=yes
limitonpeers=yes
call-limit=10
port=5060
canreinvite=no
dtmfmode=rfc2833
disallow=all
allow=ulaw

SIP Debug

1

1 Answers

1
votes

Looking at your trace, the Asterisk is cancelling the outbound call.

Without timestamps or more logging it's impossible to say why definitively. However, looking at the timestamps of the outbound INVITE and the OPTIONS from the originating client it would seem that the Originate() command is simply timing out. The Originate() command has a hard-coded 30-second timeout.

When the Originate() command terminates then the inbound call from the client hits the Hangup() step in the dialplan. This sends a 603 Declined response since the inbound call was never answered.