[asterisk-users] PJSIP configuration for Asterisk 13.1.0/SIP trunk outbound calling

Sonny Rajagopalan sonny.rajagopalan at gmail.com
Wed Mar 25 12:58:22 CDT 2015


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_net=172.31.32.0/20
local_net=192.168.1.0/24
external_media_address=aa.bb.cc.dd ; replaced real public IP address
external_signaling_address=aa.bb.cc.dd ; replaced real public IP address

[sonnyGW1]
type=registration
transport=transport-udp
outbound_auth=sonnyGW1_auth
server_uri=sip:registrar at gw1.sip.us ; no registrar@ in URI
client_uri=sip:sonny at gw1.sip.us
contact_user=16175551212 ; replaced real DID
retry_interval=60
forbidden_retry_interval=600
expiration=3600

[sonnyGW1_auth]
type=auth
auth_type=userpass
password=**********
username=sonny
;realm=65.254.44.194
;realm=gw1.sip.us

[sonnyGW1]
type=aor
contact=sip:sonnyGW1 at 65.254.44.194:5060 ; tried also no username in URI

[sonnyGW1]
type=endpoint
transport=transport-udp
context=fromgw
allow=!all,ulaw
outbound_auth=sonnyGW1_auth
aors=sonnyGW1
from_domain=gw1.sip.us

[sonnyGW1]
type=identify
endpoint=sonnyGW1
match=65.254.44.194

;; All endpoints for internal extensions follow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150325/39c93196/attachment.html>


More information about the asterisk-users mailing list