[asterisk-users] pjsip trunking configuration issue

Kevin Long kevin.long at haloprivacy.com
Thu Feb 8 01:53:59 CST 2018



Greetings ! 


My goal is to get Twilio trunking working, and with TLS/SRTP. 

I see this concerning message in my log:

[Feb  7 16:50:26] ERROR[20596] res_sorcery_config.c: Could not create an object of type 'endpoint' with id ’twilio' from configuration file ‘pjsip.conf’



Thus, ‘pjsip show endpoints’  does not show the endpoint for the Twilio trunk. 


Hoping for a sanity check of my pjsip.conf file, and what could be causing this.  

A test call form Twilio’s system hits the PBX (over TLS), but always says “No matching endpoint found” in the asterisk log.



pjsip.conf

[transport-tls]
type = transport
protocol = tls
bind = 0.0.0.0:5061
cert_file=cert_file
priv_key_file=key_file
method=tlsv1
external_media_address=X.Y.Z.D
external_signaling_address=X.Y.Z.D
verify_client=no
verify_server=no
allow_reload=yes

[twilio](!)
type=endpoint
transport=transport-tls
context=from-twilio
disallow=all
allow=ulaw
dtmf_mode=inband
media_encryption=sdes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
canreinvite=no
tlsdontverifyserver=yes


[auth-out](!)
type=auth
auth_type=userpass

[twilio]
aors=twilio-aors

[twilio-aors]
type=aor
contact=sips:trunkname.pstn.twilio.com:5061 ;tried with sip: also

[twilio]
type=identify
endpoint=twilio
match=54.172.60.0
match=54.172.60.1
match=54.172.60.2
match=54.172.60.3

[endpoint-basic](!)
type=endpoint
transport=transport-tls
context=from-phones
disallow=all
allow=ulaw

[auth-userpass](!)
type=auth
auth_type=userpass

[aor-single-reg](!)
type=aor
max_contacts=20

[1001](endpoint-basic)
auth=auth1001
aors=1001

[auth1001](auth-userpass)
password=password123
username=1001

[1001](aor-single-reg)


Extensions.conf

[from-twilio]
exten => _+1NXXXXXXXXX,1,Dial(PJSIP/1001)

[from-phones]
exten => _NXXNXXXXXX,1,Set(CALLERID(all)="David" <78451234>)
same => n,Dial(PJSIP/+1${EXTEN}@twilio)


More information about the asterisk-users mailing list