Asterisk 12.1.1 with pjsip not registering Cisco 7941

I installed Asterisk 12.1.1 from source on CentOS 6.5 and initially configured it to work with SIP. I was able to get all devices working including X-lite, a Polycom vvx1500 and the Cisco 7941. Everything worked fine including video.

I recompiled Asterisk without chan_sip to get it working with only pjsip. I have since been able to get X-lite to X-lite audio working, the Polycom vvx1500 audio. The Cisco 7941 however is stuck registering. I used the following to configure pjsip.conf

;===============TRANSPORT

[simpletrans]
type=transport
protocol=udp
bind=0.0.0.0

;===============ENDPOINT TEMPLATES

endpoint-basic
type=endpoint
transport=simpletrans
context=internal
disallow=all
allow=ulaw

auth-userpass
type=auth
auth_type=userpass

aor-single-reg
type=aor
max_contacts=1

;===============EXTENSION 6001

6001
auth=auth6001
aors=6001

auth6001
password=6001
username=6001

6001

Any suggestions?

Enable pjsip debug.

After running debug this is what I got:

<— Received SIP request (683 bytes) from UDP:172.X.X.X:49162 —>
REGISTER sip:172.X.X.X SIP/2.0
Via: SIP/2.0/UDP 172.X.X.X:5060;branch=z9hG4bKe6bf3a86
From: sip:10405@172.X.X.X;tag=0023049a8xxxxxxxxf434118-2d3065ce
To: sip:10405@172.X.X.X
Call-ID: 0023049a-xxxxxxxx-16c11800-38b70df6@172.X.X.X
Max-Forwards: 70
Date: Tue, 05 May 2009 20:36:25 GMT
CSeq: 101 REGISTER
User-Agent: Cisco-CP7941G/8.5.2
Contact: sip:10405@172.X.X.X:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-002304xxxxxx”;+u.sip!model.ccm.cisco.com="115"
Supported: (null),X-cisco-xsi-7.0.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:25 Name=SEP002304XXXXXX Load=SIP41.8-5-2S Last=initialized"
Expires: 3600

<— Transmitting SIP response (478 bytes) to UDP:172.X.X.X:49162 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.X.X.X:5060;rport;received=172.X.X.X;branch=z9hG4bKe6bf3a86
Call-ID: 0023049a-xxxxxxxx-16c11800-38b70df6@172.X.X.X
From: sip:10405@172.X.X.X;tag=0023049xxxxxxxx23f434118-2d3065ce
To: sip:10405@172.X.X.X;tag=z9hG4bKe6bf3a86
CSeq: 101 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1396042718/1243b24bxxxxxxxx67f4a714789d6f24”,opaque=“294e3470xxxxxxxx”,algorithm=md5,qop="auth"
Content-Length: 0

That REGISTER sequence is incomplete, your phone must re send the REGISTER again with the www digest auth in it in order to register.

Try capturing the complete log, if thats all, then your phone is not responding the challenge.

I’m having a similar issue with Asterisk 12.3.2 and a Cisco 7970. Is the Cisco SIP stack not compatible with pjsip? Here’s a copy of the pjsip trace and the asterisk console:

<— Received SIP request (958 bytes) from UDP:192.168.1.104:52767 —>
REGISTER sip:192.168.1.147 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.104:5060;branch=z9hG4bK516ff916
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
Max-Forwards: 70
Date: Tue, 05 Feb 2013 02:24:46 GMT
CSeq: 101 REGISTER
User-Agent: Cisco-CP7970G/9.3.1
Contact: sip:1002@192.168.1.104:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001380226e57”;+u.sip!devicename.ccm.cisco.com=“SEP001380226E57”;+u.sip!model.ccm.cisco.com="30006"
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-6.0.0,X-cisco-xsi-8.5.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:14 Name=SEP001380226E57 Load=SIP70.9-3-1SR2-1S Last=cm-closed-tcp"
Expires: 3600

[2014-06-13 11:54:25] NOTICE[26227]: res_pjsip/pjsip_distributor.c:246 log_unidentified_request: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:52767’ (callid: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104) - No matching endpoint found
<— Transmitting SIP response (520 bytes) to UDP:192.168.1.104:52767 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.104:5060;rport;received=192.168.1.104;branch=z9hG4bK516ff916
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147;tag=z9hG4bK516ff916
CSeq: 101 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1402678465/6709fec1da55176847f2a32dcef0dd82”,opaque=“172666d1538e1212”,algorithm=md5,qop="auth"
Server: FPBX-12.0.1alpha51(12.3.2)
Content-Length: 0

<— Received SIP request (2069 bytes) from UDP:192.168.1.104:51657 —>
REFER sip:192.168.1.147 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.104:5060;branch=z9hG4bKef4e619e
From: sip:001380226e57@192.168.1.104;tag=001380226e57000206b08360-bfeddbee
To: sip:192.168.1.147
Call-ID: 00138022-6e570002-e2def018-2282bbf6@192.168.1.104
Date: Tue, 05 Feb 2013 02:24:46 GMT
CSeq: 1000 REFER
User-Agent: Cisco-CP7970G/9.3.1
Expires: 10
Max-Forwards: 70
Contact: sip:001380226e57@192.168.1.104:5060
Require: norefersub
Referred-By: sip:001380226e57@192.168.1.104
Refer-To: cid:dbbc3f90@192.168.1.104
Content-Id: dbbc3f90@192.168.1.104
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE
Content-Length: 1308
Content-Type: application/x-cisco-alarm+xml
Content-Disposition: session;handling=required

<?xml version="1.0" encoding="UTF-8"?> SEP001380226E57 192.168.1.105/24 192.168.1.1 CP-7970G 1 0 1 4 0 0 4095 192.168.1.147 0 13600306518511360028803907 14 Sent:REGISTER sip:192.168.1.147 SIP/2.0 Cseq:101 REGISTER CallId:00138022-6e570005-4677c4c9-d2468146@192.168.1.104 [2014-06-13 11:54:26] NOTICE[27538]: res_pjsip/pjsip_distributor.c:246 log_unidentified_request: Request from '' failed for '192.168.1.104:51657' (callid: 00138022-6e570002-e2def018-2282bbf6@192.168.1.104) - No matching endpoint found <--- Transmitting SIP response (521 bytes) to UDP:192.168.1.104:51657 ---> SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.1.104:5060;rport;received=192.168.1.104;branch=z9hG4bKef4e619e Call-ID: 00138022-6e570002-e2def018-2282bbf6@192.168.1.104 From: ;tag=001380226e57000206b08360-bfeddbee To: ;tag=z9hG4bKef4e619e CSeq: 1000 REFER WWW-Authenticate: Digest realm="asterisk",nonce="1402678466/1f0291f85a02413bdb80fff02ebee0d8",opaque="575bd04d74452b64",algorithm=md5,qop="auth" Server: FPBX-12.0.1alpha51(12.3.2) Content-Length: 0

<— Received SIP request (958 bytes) from UDP:192.168.1.104:52767 —>
REGISTER sip:192.168.1.147 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.104:5060;branch=z9hG4bK516ff916
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
Max-Forwards: 70
Date: Tue, 05 Feb 2013 02:24:46 GMT
CSeq: 101 REGISTER
User-Agent: Cisco-CP7970G/9.3.1
Contact: sip:1002@192.168.1.104:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001380226e57”;+u.sip!devicename.ccm.cisco.com=“SEP001380226E57”;+u.sip!model.ccm.cisco.com="30006"
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-6.0.0,X-cisco-xsi-8.5.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:14 Name=SEP001380226E57 Load=SIP70.9-3-1SR2-1S Last=cm-closed-tcp"
Expires: 3600

[2014-06-13 11:54:26] NOTICE[26227]: res_pjsip/pjsip_distributor.c:246 log_unidentified_request: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:52767’ (callid: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104) - No matching endpoint found
<— Transmitting SIP response (520 bytes) to UDP:192.168.1.104:52767 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.104:5060;rport;received=192.168.1.104;branch=z9hG4bK516ff916
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147;tag=z9hG4bK516ff916
CSeq: 101 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1402678466/adc0052802d0ee690398bbe51fb2c29b”,opaque=“7f40e9672738bcce”,algorithm=md5,qop="auth"
Server: FPBX-12.0.1alpha51(12.3.2)
Content-Length: 0

[2014-06-13 11:54:27] ERROR[26232]: pjsip:0 <?>: sip_transport. Error processing 2069 bytes packet from UDP 192.168.1.104:51412 : PJSIP syntax error exception when parsing ‘’ header on line 1 col 1:
<— Received SIP request (958 bytes) from UDP:192.168.1.104:52767 —>
REGISTER sip:192.168.1.147 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.104:5060;branch=z9hG4bK516ff916
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
Max-Forwards: 70
Date: Tue, 05 Feb 2013 02:24:46 GMT
CSeq: 101 REGISTER
User-Agent: Cisco-CP7970G/9.3.1
Contact: sip:1002@192.168.1.104:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001380226e57”;+u.sip!devicename.ccm.cisco.com=“SEP001380226E57”;+u.sip!model.ccm.cisco.com="30006"
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-6.0.0,X-cisco-xsi-8.5.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:14 Name=SEP001380226E57 Load=SIP70.9-3-1SR2-1S Last=cm-closed-tcp"
Expires: 3600

[2014-06-13 11:54:27] NOTICE[27538]: res_pjsip/pjsip_distributor.c:246 log_unidentified_request: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:52767’ (callid: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104) - No matching endpoint found
<— Transmitting SIP response (520 bytes) to UDP:192.168.1.104:52767 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.104:5060;rport;received=192.168.1.104;branch=z9hG4bK516ff916
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147;tag=z9hG4bK516ff916
CSeq: 101 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1402678467/fccc661771763b7b1d601dbe5d848c51”,opaque=“75f3a88924d1dbd2”,algorithm=md5,qop="auth"
Server: FPBX-12.0.1alpha51(12.3.2)
Content-Length: 0

<— Received SIP request (958 bytes) from UDP:192.168.1.104:52767 —>
REGISTER sip:192.168.1.147 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.104:5060;branch=z9hG4bK516ff916
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
Max-Forwards: 70
Date: Tue, 05 Feb 2013 02:24:46 GMT
CSeq: 101 REGISTER
User-Agent: Cisco-CP7970G/9.3.1
Contact: sip:1002@192.168.1.104:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001380226e57”;+u.sip!devicename.ccm.cisco.com=“SEP001380226E57”;+u.sip!model.ccm.cisco.com="30006"
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-6.0.0,X-cisco-xsi-8.5.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:14 Name=SEP001380226E57 Load=SIP70.9-3-1SR2-1S Last=cm-closed-tcp"
Expires: 3600

[2014-06-13 11:54:29] NOTICE[26227]: res_pjsip/pjsip_distributor.c:246 log_unidentified_request: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:52767’ (callid: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104) - No matching endpoint found
<— Transmitting SIP response (520 bytes) to UDP:192.168.1.104:52767 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.104:5060;rport;received=192.168.1.104;branch=z9hG4bK516ff916
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147;tag=z9hG4bK516ff916
CSeq: 101 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1402678469/2ee3c94bc8785a1ed82208dd941cea1c”,opaque=“52e5a0a52a43532b”,algorithm=md5,qop="auth"
Server: FPBX-12.0.1alpha51(12.3.2)
Content-Length: 0

<— Received SIP request (958 bytes) from UDP:192.168.1.104:52767 —>
REGISTER sip:192.168.1.147 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.104:5060;branch=z9hG4bK516ff916
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
Max-Forwards: 70
Date: Tue, 05 Feb 2013 02:24:46 GMT
CSeq: 101 REGISTER
User-Agent: Cisco-CP7970G/9.3.1
Contact: sip:1002@192.168.1.104:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001380226e57”;+u.sip!devicename.ccm.cisco.com=“SEP001380226E57”;+u.sip!model.ccm.cisco.com="30006"
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-6.0.0,X-cisco-xsi-8.5.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:14 Name=SEP001380226E57 Load=SIP70.9-3-1SR2-1S Last=cm-closed-tcp"
Expires: 3600

[2014-06-13 11:54:33] NOTICE[27538]: res_pjsip/pjsip_distributor.c:246 log_unidentified_request: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:52767’ (callid: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104) - No matching endpoint found
<— Transmitting SIP response (520 bytes) to UDP:192.168.1.104:52767 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.104:5060;rport;received=192.168.1.104;branch=z9hG4bK516ff916
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147;tag=z9hG4bK516ff916
CSeq: 101 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1402678473/999fb1a94a416c2e2f64f18edb6ab304”,opaque=“5e41b9d0576492ef”,algorithm=md5,qop="auth"
Server: FPBX-12.0.1alpha51(12.3.2)
Content-Length: 0

<— Received SIP request (958 bytes) from UDP:192.168.1.104:52767 —>
REGISTER sip:192.168.1.147 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.104:5060;branch=z9hG4bK516ff916
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
Max-Forwards: 70
Date: Tue, 05 Feb 2013 02:24:46 GMT
CSeq: 101 REGISTER
User-Agent: Cisco-CP7970G/9.3.1
Contact: sip:1002@192.168.1.104:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001380226e57”;+u.sip!devicename.ccm.cisco.com=“SEP001380226E57”;+u.sip!model.ccm.cisco.com="30006"
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-6.0.0,X-cisco-xsi-8.5.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:14 Name=SEP001380226E57 Load=SIP70.9-3-1SR2-1S Last=cm-closed-tcp"
Expires: 3600

[2014-06-13 11:54:37] NOTICE[26227]: res_pjsip/pjsip_distributor.c:246 log_unidentified_request: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:52767’ (callid: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104) - No matching endpoint found
<— Transmitting SIP response (520 bytes) to UDP:192.168.1.104:52767 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.104:5060;rport;received=192.168.1.104;branch=z9hG4bK516ff916
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147;tag=z9hG4bK516ff916
CSeq: 101 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1402678477/213a5011a82bb6e5495d99c139248f29”,opaque=“2b9efa2d5d05e60f”,algorithm=md5,qop="auth"
Server: FPBX-12.0.1alpha51(12.3.2)
Content-Length: 0

<— Received SIP request (958 bytes) from UDP:192.168.1.104:52767 —>
REGISTER sip:192.168.1.147 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.104:5060;branch=z9hG4bK516ff916
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
Max-Forwards: 70
Date: Tue, 05 Feb 2013 02:24:46 GMT
CSeq: 101 REGISTER
User-Agent: Cisco-CP7970G/9.3.1
Contact: sip:1002@192.168.1.104:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001380226e57”;+u.sip!devicename.ccm.cisco.com=“SEP001380226E57”;+u.sip!model.ccm.cisco.com="30006"
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-6.0.0,X-cisco-xsi-8.5.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:14 Name=SEP001380226E57 Load=SIP70.9-3-1SR2-1S Last=cm-closed-tcp"
Expires: 3600

[2014-06-13 11:54:41] NOTICE[27538]: res_pjsip/pjsip_distributor.c:246 log_unidentified_request: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:52767’ (callid: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104) - No matching endpoint found
<— Transmitting SIP response (520 bytes) to UDP:192.168.1.104:52767 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.104:5060;rport;received=192.168.1.104;branch=z9hG4bK516ff916
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147;tag=z9hG4bK516ff916
CSeq: 101 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1402678481/5061ad69d57bd2192dcbd3d38fad0661”,opaque=“218630de299eb2cb”,algorithm=md5,qop="auth"
Server: FPBX-12.0.1alpha51(12.3.2)
Content-Length: 0

<— Received SIP request (958 bytes) from UDP:192.168.1.104:52767 —>
REGISTER sip:192.168.1.147 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.104:5060;branch=z9hG4bK516ff916
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
Max-Forwards: 70
Date: Tue, 05 Feb 2013 02:24:46 GMT
CSeq: 101 REGISTER
User-Agent: Cisco-CP7970G/9.3.1
Contact: sip:1002@192.168.1.104:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001380226e57”;+u.sip!devicename.ccm.cisco.com=“SEP001380226E57”;+u.sip!model.ccm.cisco.com="30006"
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-6.0.0,X-cisco-xsi-8.5.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:14 Name=SEP001380226E57 Load=SIP70.9-3-1SR2-1S Last=cm-closed-tcp"
Expires: 3600

[2014-06-13 11:54:45] NOTICE[26227]: res_pjsip/pjsip_distributor.c:246 log_unidentified_request: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:52767’ (callid: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104) - No matching endpoint found
<— Transmitting SIP response (520 bytes) to UDP:192.168.1.104:52767 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.104:5060;rport;received=192.168.1.104;branch=z9hG4bK516ff916
Call-ID: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104
From: sip:1002@192.168.1.147;tag=001380226e5700034fdb05c0-6209740e
To: sip:1002@192.168.1.147;tag=z9hG4bK516ff916
CSeq: 101 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1402678485/7b372e66a78c0acbeaf60f0c84ced233”,opaque=“26e7eaf91d146ade”,algorithm=md5,qop="auth"
Server: FPBX-12.0.1alpha51(12.3.2)
Content-Length: 0

[2014-06-13 11:54:57] NOTICE[27538] res_pjsip/pjsip_distributor.c: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:52767’ (callid: 00138022-6e570002-bcbd9548-1c08fb66@192.168.1.104) - No matching endpoint found
[2014-06-13 11:55:13] NOTICE[26227] res_pjsip/pjsip_distributor.c: Request from ‘sip:001380226e57@192.168.1.104’ failed for ‘192.168.1.104:52243’ (callid: 00138022-6e570003-9aa4af96-77801626@192.168.1.104) - No matching endpoint found
[2014-06-13 11:55:13] NOTICE[27538] res_pjsip/pjsip_distributor.c: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:50964’ (callid: 00138022-6e570003-d5879e16-86033da6@192.168.1.104) - No matching endpoint found
[2014-06-13 11:55:14] NOTICE[26227] res_pjsip/pjsip_distributor.c: Request from ‘sip:001380226e57@192.168.1.104’ failed for ‘192.168.1.104:49271’ (callid: 00138022-6e570003-9aa4af96-77801626@192.168.1.104) - No matching endpoint found
[2014-06-13 11:55:14] NOTICE[27538] res_pjsip/pjsip_distributor.c: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:50964’ (callid: 00138022-6e570003-d5879e16-86033da6@192.168.1.104) - No matching endpoint found
[2014-06-13 11:55:15] NOTICE[26227] res_pjsip/pjsip_distributor.c: Request from ‘sip:1002@192.168.1.147’ failed for ‘192.168.1.104:50964’ (callid: 00138022-6e570003-d5879e16-86033da6@192.168.1.104) - No matching endpoint found

Hi, I have the same problem did you find a solution.

I have Cisco 7940 and Asterisk 13 and the Cisco 7940’s won’t register.

Thanks

I’ve no idea why the last poster has a problem as they haven’t provided any information, but, from the trace, it looks to me as though the Cisco isn’t prepared to ignore new parameters (opaque) on the WWW-Authenticate. I don’t use PJSIP, so I don’t know if you can eliminate that parameter without modifying the source code and recompiling, or interposing a suitably programmed proxy.

Hi david55,

Yes I take your point (lack of information).

We have Asterisk 1.4.21.2 and Cisco 7940s, this combination has been rock solid for many years. Due to changes here I need to move to a new version so I decided on Asterisk 13 and pjsip. My initial testing was done with zopier soft phone and this works well.

Problem; cannot get the Cisco 7940 to register, I am trying to workout if it is possible or if I need to re-compile with sip instead of pjsip.

I would be interested in your thoughts.

Thanks

Here is the debug;

<--- Received SIP request (501 bytes) from UDP:192.168.41.56:50608 --->
REGISTER sip:192.168.5.9 SIP/2.0
Via: SIP/2.0/UDP 192.168.41.56:5060;branch=z9hG4bK697e3ac0
From: <sip:901@192.168.5.9>;tag=001121d89fd100020b0a72ad-1c671396
To: <sip:901@192.168.5.9>
Call-ID: 001121d8-9fd10002-6e1f8ea4-23b30eb3@192.168.41.56
Max-Forwards: 70
CSeq: 101 REGISTER
User-Agent: Cisco-CP7940G/8.0
Contact: <sip:901@192.168.41.56:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-001121d89fd1>";+u.sip!model.ccm.cisco.com="8"
Content-Length: 0
Expires: 3600


<--- Transmitting SIP response (472 bytes) to UDP:192.168.41.56:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.41.56:5060;received=192.168.41.56;branch=z9hG4bK697e3ac0
Call-ID: 001121d8-9fd10002-6e1f8ea4-23b30eb3@192.168.41.56
From: <sip:901@192.168.5.9>;tag=001121d89fd100020b0a72ad-1c671396
To: <sip:901@192.168.5.9>;tag=z9hG4bK697e3ac0
CSeq: 101 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1431950514/cc3a7841ce3035e8937e60e71de18f78",opaque="278d8fff3b58949b",algorithm=md5,qop="auth"
Content-Length:  0


<--- Received SIP request (501 bytes) from UDP:192.168.41.56:50614 --->
REGISTER sip:192.168.5.9 SIP/2.0
Via: SIP/2.0/UDP 192.168.41.56:5060;branch=z9hG4bK2d226e6b
From: <sip:901@192.168.5.9>;tag=001121d89fd10003411c9c26-63616032
To: <sip:901@192.168.5.9>
Call-ID: 001121d8-9fd10003-5e305caa-03956d06@192.168.41.56
Max-Forwards: 70
CSeq: 101 REGISTER
User-Agent: Cisco-CP7940G/8.0
Contact: <sip:901@192.168.41.56:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-001121d89fd1>";+u.sip!model.ccm.cisco.com="8"
Content-Length: 0
Expires: 3600


<--- Transmitting SIP response (472 bytes) to UDP:192.168.41.56:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.41.56:5060;received=192.168.41.56;branch=z9hG4bK2d226e6b
Call-ID: 001121d8-9fd10003-5e305caa-03956d06@192.168.41.56
From: <sip:901@192.168.5.9>;tag=001121d89fd10003411c9c26-63616032
To: <sip:901@192.168.5.9>;tag=z9hG4bK2d226e6b
CSeq: 101 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1431950514/795d353bdf3e0bf50ec333e982610680",opaque="37a58a0c0c7b39dc",algorithm=md5,qop="auth"
Content-Length:  0


<--- Received SIP request (753 bytes) from UDP:192.168.41.56:50608 --->
REGISTER sip:192.168.5.9 SIP/2.0
Via: SIP/2.0/UDP 192.168.41.56:5060;branch=z9hG4bK26ca741d
From: <sip:901@192.168.5.9>;tag=001121d89fd100020b0a72ad-1c671396
To: <sip:901@192.168.5.9>
Call-ID: 001121d8-9fd10002-6e1f8ea4-23b30eb3@192.168.41.56
Max-Forwards: 70
CSeq: 102 REGISTER
User-Agent: Cisco-CP7940G/8.0
Contact: <sip:901@192.168.41.56:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-001121d89fd1>";+u.sip!model.ccm.cisco.com="8"
Authorization: Digest username="901",realm="asterisk",uri="sip:192.168.5.9",response="e7a35ef9a4e598a8be9e78d5146bdc3b",nonce="1431950514/cc3a7841ce3035e8937e60e71de18f78",opaque="278d8fff3b58949b",cnonce="15286d54",qop=auth,nc=00000001,algorithm=md5
Content-Length: 0
Expires: 3600


    -- Added contact 'sip:901@192.168.41.56:5060;transport=udp' to AOR '901' with expiration of 3600 seconds
<--- Transmitting SIP response (418 bytes) to UDP:192.168.41.56:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.41.56:5060;received=192.168.41.56;branch=z9hG4bK26ca741d
Call-ID: 001121d8-9fd10002-6e1f8ea4-23b30eb3@192.168.41.56
From: <sip:901@192.168.5.9>;tag=001121d89fd100020b0a72ad-1c671396
To: <sip:901@192.168.5.9>;tag=z9hG4bK26ca741d
CSeq: 102 REGISTER
Date: Mon, 18 May 2015 12:01:55 GMT
Contact: <sip:901@192.168.41.56:5060;transport=udp>;expires=3599
Content-Length:  0


<--- Received SIP request (753 bytes) from UDP:192.168.41.56:50615 --->
REGISTER sip:192.168.5.9 SIP/2.0
Via: SIP/2.0/UDP 192.168.41.56:5060;branch=z9hG4bK34b0ff56
From: <sip:901@192.168.5.9>;tag=001121d89fd10003411c9c26-63616032
To: <sip:901@192.168.5.9>
Call-ID: 001121d8-9fd10003-5e305caa-03956d06@192.168.41.56
Max-Forwards: 70
CSeq: 102 REGISTER
User-Agent: Cisco-CP7940G/8.0
Contact: <sip:901@192.168.41.56:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-001121d89fd1>";+u.sip!model.ccm.cisco.com="8"
Authorization: Digest username="901",realm="asterisk",uri="sip:192.168.5.9",response="f7d5ebf663c05bbc73b2d858cb430c7a",nonce="1431950514/795d353bdf3e0bf50ec333e982610680",opaque="37a58a0c0c7b39dc",cnonce="1abc1d95",qop=auth,nc=00000001,algorithm=md5
Content-Length: 0
Expires: 3600


<--- Transmitting SIP response (483 bytes) to UDP:192.168.41.56:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.41.56:5060;received=192.168.41.56;branch=z9hG4bK34b0ff56
Call-ID: 001121d8-9fd10003-5e305caa-03956d06@192.168.41.56
From: <sip:901@192.168.5.9>;tag=001121d89fd10003411c9c26-63616032
To: <sip:901@192.168.5.9>;tag=z9hG4bK34b0ff56
CSeq: 102 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1431950515/6cdfbda10c11feb8f717fe746a77e9f5",opaque="2ef849a60c8e5131",stale=true,algorithm=md5,qop="auth"
Content-Length:  0


<--- Received SIP request (753 bytes) from UDP:192.168.41.56:50616 --->
REGISTER sip:192.168.5.9 SIP/2.0
Via: SIP/2.0/UDP 192.168.41.56:5060;branch=z9hG4bK3e57be1d
From: <sip:901@192.168.5.9>;tag=001121d89fd10003411c9c26-63616032
To: <sip:901@192.168.5.9>
Call-ID: 001121d8-9fd10003-5e305caa-03956d06@192.168.41.56
Max-Forwards: 70
CSeq: 103 REGISTER
User-Agent: Cisco-CP7940G/8.0
Contact: <sip:901@192.168.41.56:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-001121d89fd1>";+u.sip!model.ccm.cisco.com="8"
Authorization: Digest username="901",realm="asterisk",uri="sip:192.168.5.9",response="6b46d30cadccef4b9611e977c6083b16",nonce="1431950515/6cdfbda10c11feb8f717fe746a77e9f5",opaque="2ef849a60c8e5131",cnonce="2b0b7628",qop=auth,nc=00000002,algorithm=md5
Content-Length: 0
Expires: 3600


<--- Transmitting SIP response (483 bytes) to UDP:192.168.41.56:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.41.56:5060;received=192.168.41.56;branch=z9hG4bK3e57be1d
Call-ID: 001121d8-9fd10003-5e305caa-03956d06@192.168.41.56
From: <sip:901@192.168.5.9>;tag=001121d89fd10003411c9c26-63616032
To: <sip:901@192.168.5.9>;tag=z9hG4bK3e57be1d
CSeq: 103 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1431950515/839955e4d41e98b364180cb40b4450a6",opaque="51f4550537805e8d",stale=true,algorithm=md5,qop="auth"
Content-Length:  0


<--- Received SIP request (753 bytes) from UDP:192.168.41.56:50617 --->
REGISTER sip:192.168.5.9 SIP/2.0
Via: SIP/2.0/UDP 192.168.41.56:5060;branch=z9hG4bK39bd0713
From: <sip:901@192.168.5.9>;tag=001121d89fd10003411c9c26-63616032
To: <sip:901@192.168.5.9>
Call-ID: 001121d8-9fd10003-5e305caa-03956d06@192.168.41.56
Max-Forwards: 70
CSeq: 104 REGISTER
User-Agent: Cisco-CP7940G/8.0
Contact: <sip:901@192.168.41.56:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-001121d89fd1>";+u.sip!model.ccm.cisco.com="8"
Authorization: Digest username="901",realm="asterisk",uri="sip:192.168.5.9",response="1297a65b44cee1a51a397d130bc9585d",nonce="1431950515/839955e4d41e98b364180cb40b4450a6",opaque="51f4550537805e8d",cnonce="550d453a",qop=auth,nc=00000003,algorithm=md5
Content-Length: 0
Expires: 3600


<--- Transmitting SIP response (483 bytes) to UDP:192.168.41.56:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.41.56:5060;received=192.168.41.56;branch=z9hG4bK39bd0713
Call-ID: 001121d8-9fd10003-5e305caa-03956d06@192.168.41.56
From: <sip:901@192.168.5.9>;tag=001121d89fd10003411c9c26-63616032
To: <sip:901@192.168.5.9>;tag=z9hG4bK39bd0713
CSeq: 104 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1431950515/96966072c2f28d2965e16e461231c9c5",opaque="770e6bf027a4b491",stale=true,algorithm=md5,qop="auth"
Content-Length:  0

Like the other ones, the Cisco is either not receiving or not accepting the 401 response. The only thing I can think of is that Cisco phones don’t like additional parameters on the www-authenticate.

It looks as though opaque is used by chan_sip, although it is in some way optional, as is qop. It may be one of these that it doesn’t like, but I’d need to read the RFCs in more depth to be sure I understood when they are used.

I have exactly the same problem, is there a solution to this?
I’m running asterisk 13 with freepbx 12 and cisco 7940 ip phone and getting the same error about pjsip not registering. I’ve been trawling google but not finding any solution. Thanks for any advice.

While I can’t speak for FreePBX from an Asterisk PJSIP perspective the “force_rport=no” option is needed for the Cisco 7940 and 7960 series phones.

where is this setting “force_rport=” ? What file is it inside? I’ve been searching all over my machine and can’t find it.

It is set on the endpoint in pjsip.conf