Hi there,
Pretty new to Asterisk and I’m trying to SIP register to an NEC PABX. I can do it with chan_sip but I’d really prefer to use PJSIP. I’m getting a 403 forbidden. Any help would be much appreciated. I captured the interaction below. IP addresses etc have been obfuscated.
REGISTER sip:10.54.211.19:5060 SIP/2.0
Via: SIP/2.0/UDP 10.61.161.134:5060;rport;branch=z9hG4bKPj5fb58123-febe-4b2e-9478-65f10d9d2588
From: <sip:90658@10.54.211.19>;tag=55ec7acf-42c2-43f1-9e53-4dfb343a9269
To: <sip:90658@10.54.211.19>
Call-ID: c03a7a5c-96f6-4c05-ba7d-e1a9ce2a3bea
CSeq: 15008 REGISTER
Contact: <sip:90658@10.61.161.134:5060>
Expires: 3600
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 14.4.0
Content-Length: 0
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.61.161.134:5060;rport;branch=z9hG4bKPj5fb58123-febe-4b2e-9478-65f10d9d2588
From: <sip:90658@10.54.211.19>;tag=55ec7acf-42c2-43f1-9e53-4dfb343a9269
To: <sip:90658@10.54.211.19>;tag=09ee9ecc
Call-ID: c03a7a5c-96f6-4c05-ba7d-e1a9ce2a3bea
CSeq: 15008 REGISTER
WWW-Authenticate: Digest realm="insiph@ippbx0a44c303.com", nonce="62fc0645ee9daac4ef278bb26f966401", opaque="a271cac4fdef6bb07e36e958b668264e", stale=FALSE, algorithm=MD5, qop="auth"
User-Agent: Enterprise IP-PBX (InSIPH)
Allow: INVITE, ACK, REGISTER, BYE, OPTIONS, INFO, CANCEL, REFER, NOTIFY, SUBSCRIBE, PRACK, UPDATE
Content-Length: 0
REGISTER sip:10.54.211.19:5060 SIP/2.0
Via: SIP/2.0/UDP 10.61.161.134:5060;rport;branch=z9hG4bKPj296c53b3-6ef6-433c-8626-1009f6217ced
From: <sip:90658@10.54.211.19>;tag=55ec7acf-42c2-43f1-9e53-4dfb343a9269
To: <sip:90658@10.54.211.19>
Call-ID: c03a7a5c-96f6-4c05-ba7d-e1a9ce2a3bea
CSeq: 15009 REGISTER
Contact: <sip:90658@10.61.161.134:5060>
Expires: 3600
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 14.4.0
Authorization: Digest username="90658", realm="insiph@ippbx0a44c303.com", nonce="62fc0645ee9daac4ef278bb26f966401", uri="sip:10.54.211.19:5060", response="5744963f4b45722de961bca69d2e2252", algorithm=MD5, cnonce="792214f2-6a4a-4734-aeac-5640e20cc476", opaque="a271cac4fdef6bb07e36e958b668264e", qop=auth, nc=00000001
Content-Length: 0
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 10.61.161.134:5060;rport;branch=z9hG4bKPj296c53b3-6ef6-433c-8626-1009f6217ced
From: <sip:90658@10.54.211.19>;tag=55ec7acf-42c2-43f1-9e53-4dfb343a9269
To: <sip:90658@10.54.211.19>;tag=09edc595
Call-ID: c03a7a5c-96f6-4c05-ba7d-e1a9ce2a3bea
CSeq: 15009 REGISTER
User-Agent: Enterprise IP-PBX (InSIPH)
Allow: INVITE, ACK, REGISTER, BYE, OPTIONS, INFO, CANCEL, REFER, NOTIFY, SUBSCRIBE, PRACK, UPDATE
Content-Length: 0
My pjsip.conf contains the following:
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
[transport-tcp]
type=transport
protocol=tcp
bind=0.0.0.0
;========================NEC Registration======================
[nec-siptrunk-auth]
type=auth
auth_type=userpass
username=90658
password=
[nec-siptrunk-aor]
type=aor
contact=sip:10.54.211.19:5060
[nec-siptrunk]
type=endpoint
context=from-nec
disallow=all
allow=alaw
;allow=g722
;allow=ulaw
;allow=g729
outbound_auth=nec-siptrunk-auth
aors=nec-siptrunk-aor
[nec-siptrunk-registration]
type=registration
transport=transport-udp
outbound_auth=nec-siptrunk-auth
server_uri=sip:10.54.211.19:5060
client_uri=sip:90658@10.54.211.19
contact_user=90658
retry_interval=60
[nec-siptrunk-identify]
type=identify
match=10.54.211.19
endpoint=nec-siptrunk
Thanks,
Rhys