PJSIP Configuration For Asterisk 13.1.0/SIP Trunk Outbound Calling

Home » Asterisk Users » PJSIP Configuration For Asterisk 13.1.0/SIP Trunk Outbound Calling
Asterisk Users No Comments

Hello,

I have had numerous issues with PJSIP outbound calling in Asterisk 13.1.0
and SIP.US SIP trunk. My Asterisk server is on EC2 and I have opened up the appropriate ports. The SIP clients can be anywhere on the Internet, including behind NATs.

I am able to get to my Asterisk server’s internal extensions via the DID
(and appropriate dialplans) but I am not able to make outbound calls to the PSTN from my (internal) extensions. I have the appropriate dialplans and I
know the Asterisk server is getting in touch with the SIP.US server (see http://lists.digium.com/pipermail/asterisk-users/2015-March/286176.html which is the error I get). My question is, does anybody have a working pjsip.conf with SIP.US I could use? It has to be pjsip.conf (and not the wizard based configuration introduced in 13.2.0).

Do I need to set up an outbound_proxy for SIP.US?

Any help is deeply appreciated.

Thank you!

Alternately, could you help me with my config (a copy is below, changed some sensitive fields for obvious reasons)?

I have configured my trunks in the following manner (based on https://wiki.asterisk.org/wiki/display/AST/res_pjsip+Configuration+Examples, and other pages on the same wiki, but there are small changes between them which confused the heck out of me):

[transport-udp]
type=transport protocol=udp bind=0.0.0.0
local_net2.31.32.0/20
local_net2.168.1.0/24
external_media_address