Cisco 7960G can't register except for one who is registered successuflly

Hello there,
I got a problem. I’m using PJSIP and all my Cisco 7960 phones can’t register logs below. Except for the Cisco 7960 from by Bedroom who is successfully registered and has the same parameters in PJSIP.conf than the others lines.
Does anyone has an idea of where it can comes from?
100 is my bedroom phone who is successfully registered
102 is one of my cisco phones can’t register.

<--- Transmitting SIP request (420 bytes) to UDP:82:5060 --->
OPTIONS sip:100@82:5060 SIP/2.0
Via: SIP/2.0/UDP 217:5060;rport;branch=z9hG4bKPje25da992-eb8a-462f-98da-23aab73a8ed6
From: <sip:100@192.168.20.63>;tag=15c55031-c71e-4c4c-8a4c-ae76a3ee46bf
To: <sip:100@82>
Contact: <sip:100@217:5060>
Call-ID: 69e9cbfb-788d-460f-98c4-deeb1b062606
CSeq: 1114 OPTIONS
Max-Forwards: 70
User-Agent: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP response (936 bytes) from UDP:82:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 217:5060;rport;branch=z9hG4bKPje25da992-eb8a-462f-98da-23aab73a8ed6
From: <sip:100@192.168.20.63>;tag=15c55031-c71e-4c4c-8a4c-ae76a3ee46bf
To: <sip:100@82>;tag=00146a743a222883167d6e19-0ef948b4
Call-ID: 69e9cbfb-788d-460f-98c4-deeb1b062606
Date: Fri, 11 Dec 2020 21:38:24 GMT
CSeq: 1114 OPTIONS
Server: Cisco-CP7960G/8.0
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE
Accept: application/sdp,multipart/mixed,multipart/alternative
Accept-Encoding: identity
Accept-Language: en
Supported: replaces,join,norefersub
Content-Length: 237
Content-Type: application/sdp
Content-Disposition: session;handling=optional

v=0
o=Cisco-SIPUA 22110 0 IN IP4 82
s=SIP Call
t=0 0
m=audio 0 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

<--- Received SIP request (546 bytes) from UDP:82:19278 --->
REGISTER sip:217 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.140:5060;branch=z9hG4bK3c2194b8
From: <sip:102@217>;tag=00078551fbf0003a0b2962c2-63669296
To: <sip:102@217.>
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
Max-Forwards: 70
Date: Fri, 11 Dec 2020 21:38:15 GMT
CSeq: 156 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:102@192.168.1.140:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00078551fbf0>";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (505 bytes) to UDP:82:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.140:5060;received=82.;branch=z9hG4bK3c2194b8
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
From: <sip:102@217>;tag=00078551fbf0003a0b2962c2-63669296
To: <sip:102@217>;tag=z9hG4bK3c2194b8
CSeq: 156 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1607722702/f7cfd33c8d3e216fe3c83855dd1e167d",opaque="642a33c726cfd147",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.1.0
Content-Length:  0

Thanks for your appreciate help!

The log is incomplete, or the phone has no idea how to authenticate itself. You have register, followed by 401. This should cause the phone to repeat the register, but this time with authentication data. It hasn’t which means it doesn’t know how to authenticate itself.

That’s the only thing I have when they try to register only 2 logs. Do you know how to fix that and also why my bedroom phone is registered and can register and not the others?

check your lan, it seems your phone don’t receice the 401 Unauthorized

Regards

I just moved my conf to pjsip_wizard and all the phones registered but now they are in the same state as my problem and they were unregistered the only one stays registered is the same phone of my bedroom what’s happening

then, all my phones are outside the PBX is all the phones are reaching him by a public ip address through nat

If there is only one request and one response, and the register succeeds, it would indicate that the response was 200, not 401, and Asterisk had no secret/authentication data, configured for that phone. I think you need to provide the working case register, as well as the failed one.

I do that right now, because I just don’t understand why they just all registered and now they unregistered and also why my bedroom phone is the only one to register :((

If both phones have the same public address, Asterisk will have trouble telling them apart. There may be ways round that, but we would need more details of your configuration.

Yes, that’s that, 2 phones have 82.xxx ip public adress, and 2 others have 149.xx.xx

<--- Transmitting SIP response (509 bytes) to UDP::5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP :5060;received=;branch=z9hG4bK19e27d31
Call-ID: 000821ac-fdba0002-68d5d79d-4c85d36d@
From: <sip:101@>;tag=000821acfdba05be6d37c318-0476b638
To: <sip:101@>;tag=z9hG4bK19e27d31
CSeq: 1488 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1607729913/0ceab59eea4961d9f48fc6921bd9ed7e",opaque="48053c7e1527f2b1",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP request (544 bytes) from UDP::19278 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK2e9a63b7
From: <sip:102@>;tag=00078551fbf001af4dbf135d-3a9fadef
To: <sip:102@>
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
Max-Forwards: 70
Date: Fri, 11 Dec 2020 23:38:02 GMT
CSeq: 389 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:102@:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00078551fbf0>";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (504 bytes) to UDP::5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP :5060;received=;branch=z9hG4bK2e9a63b7
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
From: <sip:102@>;tag=00078551fbf001af4dbf135d-3a9fadef
To: <sip:102@>;tag=z9hG4bK2e9a63b7
CSeq: 389 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1607729913/b6bcf8d496fc3b35aae1eb6858b79cc1",opaque="165e3ebc418e85d9",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP request (544 bytes) from UDP::19278 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK0f003a5c
From: <sip:102@>;tag=00078551fbf001b0393774fb-3b8804a9
To: <sip:102@>
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
Max-Forwards: 70
Date: Fri, 11 Dec 2020 23:38:34 GMT
CSeq: 390 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:102@:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00078551fbf0>";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (504 bytes) to UDP::5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP :5060;received=;branch=z9hG4bK0f003a5c
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
From: <sip:102@>;tag=00078551fbf001b0393774fb-3b8804a9
To: <sip:102@>;tag=z9hG4bK0f003a5c
CSeq: 390 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1607729914/10042c75e577278d78cfbd6a06c07e9c",opaque="6e6f45d00101fc74",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP request (544 bytes) from UDP::19278 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK0f003a5c
From: <sip:102@>;tag=00078551fbf001b0393774fb-3b8804a9
To: <sip:102@>
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
Max-Forwards: 70
Date: Fri, 11 Dec 2020 23:38:34 GMT
CSeq: 390 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:102@:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00078551fbf0>";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (504 bytes) to UDP::5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP :5060;received=;branch=z9hG4bK0f003a5c
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
From: <sip:102@>;tag=00078551fbf001b0393774fb-3b8804a9
To: <sip:102@>;tag=z9hG4bK0f003a5c
CSeq: 390 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1607729914/10042c75e577278d78cfbd6a06c07e9c",opaque="53df984422264fb5",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP request (544 bytes) from UDP::19278 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK0f003a5c
From: <sip:102@>;tag=00078551fbf001b0393774fb-3b8804a9
To: <sip:102@>
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
Max-Forwards: 70
Date: Fri, 11 Dec 2020 23:38:34 GMT
CSeq: 390 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:102@:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00078551fbf0>";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (504 bytes) to UDP::5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP :5060;received=;branch=z9hG4bK0f003a5c
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
From: <sip:102@>;tag=00078551fbf001b0393774fb-3b8804a9
To: <sip:102@>;tag=z9hG4bK0f003a5c
CSeq: 390 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1607729915/485a438a64f8bf24e29fcd8c8f55951d",opaque="3965d3ad232b7bca",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP request (509 bytes) from UDP::5060 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP 192.168.1.125:5060;branch=z9hG4bK5a2bbeba
From: <sip:100@>;tag=00146a743a2200023b64d3ef-29d76276
To: <sip:100@>
Call-ID: 00146a74-3a220002-6da3f494-67766cb8@192.168.1.125
Max-Forwards: 70
CSeq: 101 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:100@192.168.1.125:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00146a743a22>";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (505 bytes) to UDP::5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.125:5060;received=;branch=z9hG4bK5a2bbeba
Call-ID: 00146a74-3a220002-6da3f494-67766cb8@192.168.1.125
From: <sip:100@>;tag=00146a743a2200023b64d3ef-29d76276
To: <sip:100@>;tag=z9hG4bK5a2bbeba
CSeq: 101 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1607729916/c8b25dd670b797fa2c9763ebfd82e953",opaque="321db5717b251f51",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP request (764 bytes) from UDP::5060 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP 192.168.1.125:5060;branch=z9hG4bK6de97516
From: <sip:100@>;tag=00146a743a2200023b64d3ef-29d76276
To: <sip:100@>
Call-ID: 00146a74-3a220002-6da3f494-67766cb8@192.168.1.125
Max-Forwards: 70
CSeq: 102 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:100@192.168.1.125:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00146a743a22>";+u.sip!model.ccm.cisco.com="7"
Authorization: Digest username="100",realm="asterisk",uri="sip:",response="784f4eca5b9704f1768b26ecf4e69089",nonce="1607729916/c8b25dd670b797fa2c9763ebfd82e953",opaque="321db5717b251f51",cnonce="3b4defac",qop=auth,nc=00000001,algorithm=md5
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (451 bytes) to UDP::5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.125:5060;received=;branch=z9hG4bK6de97516
Call-ID: 00146a74-3a220002-6da3f494-67766cb8@192.168.1.125
From: <sip:100@>;tag=00146a743a2200023b64d3ef-29d76276
To: <sip:100@>;tag=z9hG4bK6de97516
CSeq: 102 REGISTER
Date: Fri, 11 Dec 2020 23:38:36 GMT
Contact: <sip:100@192.168.1.125:5060>;expires=119
Expires: 120
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Transmitting SIP request (421 bytes) to UDP::5060 --->
OPTIONS sip:100@:5060 SIP/2.0
Via: SIP/2.0/UDP :5060;rport;branch=z9hG4bKPj26b21820-f41b-4967-9d10-4a19248255b7
From: <sip:100@192.168.20.63>;tag=ba798a43-0205-466c-bd47-86466514092e
To: <sip:100@>
Contact: <sip:100@:5060>
Call-ID: 49770f43-4873-4bf7-a241-07f2fcdd5d8e
CSeq: 42070 OPTIONS
Max-Forwards: 70
User-Agent: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP request (762 bytes) from UDP::5060 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP 192.168.1.125:5060;branch=z9hG4bK59c7a50e
From: <sip:100@>;tag=00146a743a2200023b64d3ef-29d76276
To: <sip:100@>
Call-ID: 00146a74-3a220002-6da3f494-67766cb8@192.168.1.125
Max-Forwards: 70
CSeq: 103 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:100@192.168.1.125:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00146a743a22>";+u.sip!model.ccm.cisco.com="7"
Authorization: Digest username="100",realm="asterisk",uri="sip:",response="784f4eca5b9704f1768b26ecf4e69089",nonce="1607729916/c8b25dd670b797fa2c9763ebfd82e953",opaque="321db5717b251f51",cnonce="3b4defac",qop=auth,nc=00000001,algorithm=md5
Content-Length: 0
Expires: 0


<--- Transmitting SIP response (398 bytes) to UDP::5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.125:5060;received=;branch=z9hG4bK59c7a50e
Call-ID: 00146a74-3a220002-6da3f494-67766cb8@192.168.1.125
From: <sip:100@>;tag=00146a743a2200023b64d3ef-29d76276
To: <sip:100@>;tag=z9hG4bK59c7a50e
CSeq: 103 REGISTER
Date: Fri, 11 Dec 2020 23:38:36 GMT
Expires: 0
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP response (900 bytes) from UDP::5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP :5060;rport;branch=z9hG4bKPj26b21820-f41b-4967-9d10-4a19248255b7
From: <sip:100@192.168.20.63>;tag=ba798a43-0205-466c-bd47-86466514092e
To: <sip:100@>;tag=00146a743a22000333eb8a6b-24a28124
Call-ID: 49770f43-4873-4bf7-a241-07f2fcdd5d8e
CSeq: 42070 OPTIONS
Server: Cisco-CP7960G/8.0
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE
Accept: application/sdp,multipart/mixed,multipart/alternative
Accept-Encoding: identity
Accept-Language: en
Supported: replaces,join,norefersub
Content-Length: 237
Content-Type: application/sdp
Content-Disposition: session;handling=optional

v=0
o=Cisco-SIPUA 27163 0 IN IP4 
s=SIP Call
t=0 0
m=audio 0 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

<--- Received SIP request (507 bytes) from UDP::5060 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK3085c6f4
From: <sip:100@>;tag=00146a743a2200041f74acd2-2f600416
To: <sip:100@>
Call-ID: 00146a74-3a220002-6da3f494-67766cb8@192.168.1.125
Max-Forwards: 70
CSeq: 104 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:100@:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00146a743a22>";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (504 bytes) to UDP::5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP :5060;received=;branch=z9hG4bK3085c6f4
Call-ID: 00146a74-3a220002-6da3f494-67766cb8@192.168.1.125
From: <sip:100@>;tag=00146a743a2200041f74acd2-2f600416
To: <sip:100@>;tag=z9hG4bK3085c6f4
CSeq: 104 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1607729916/c8b25dd670b797fa2c9763ebfd82e953",opaque="4200c22a4534754b",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP request (762 bytes) from UDP::5060 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK243fb6cc
From: <sip:100@>;tag=00146a743a2200041f74acd2-2f600416
To: <sip:100@>
Call-ID: 00146a74-3a220002-6da3f494-67766cb8@192.168.1.125
Max-Forwards: 70
CSeq: 105 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:100@:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00146a743a22>";+u.sip!model.ccm.cisco.com="7"
Authorization: Digest username="100",realm="asterisk",uri="sip:",response="112305126ed8d2a3def2aa88350f7a19",nonce="1607729916/c8b25dd670b797fa2c9763ebfd82e953",opaque="4200c22a4534754b",cnonce="2d0a2111",qop=auth,nc=00000001,algorithm=md5
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (451 bytes) to UDP::5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP :5060;received=;branch=z9hG4bK243fb6cc
Call-ID: 00146a74-3a220002-6da3f494-67766cb8@192.168.1.125
From: <sip:100@>;tag=00146a743a2200041f74acd2-2f600416
To: <sip:100@>;tag=z9hG4bK243fb6cc
CSeq: 105 REGISTER
Date: Fri, 11 Dec 2020 23:38:36 GMT
Contact: <sip:100@:5060>;expires=119
Expires: 120
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Transmitting SIP request (420 bytes) to UDP::5060 --->
OPTIONS sip:100@:5060 SIP/2.0
Via: SIP/2.0/UDP :5060;rport;branch=z9hG4bKPj3ef3e729-5f78-4bed-a208-263bbd3bf3fe
From: <sip:100@192.168.20.63>;tag=8a72a84d-70f6-4225-985d-88602df8fa26
To: <sip:100@>
Contact: <sip:100@:5060>
Call-ID: e5bc287f-035b-4f9c-ac20-eb6ec431ab21
CSeq: 5835 OPTIONS
Max-Forwards: 70
User-Agent: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP request (550 bytes) from UDP::18534 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK5ca6047b
From: <sip:103@>;tag=001469e0541205ff78cb002e-2f5c0fc5
To: <sip:103@>
Call-ID: 001469e0-54120002-5bbb2382-6f51b568@
Max-Forwards: 70
Date: Fri, 11 Dec 2020 23:38:15 GMT
CSeq: 1552 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:103@:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-001469e05412>";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (509 bytes) to UDP::5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP :5060;received=;branch=z9hG4bK5ca6047b
Call-ID: 001469e0-54120002-5bbb2382-6f51b568@
From: <sip:103@>;tag=001469e0541205ff78cb002e-2f5c0fc5
To: <sip:103@>;tag=z9hG4bK5ca6047b
CSeq: 1552 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1607729916/6aefa20f5434f40c1ab4f723448cc058",opaque="1a6f565131375592",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP response (899 bytes) from UDP::5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP :5060;rport;branch=z9hG4bKPj3ef3e729-5f78-4bed-a208-263bbd3bf3fe
From: <sip:100@192.168.20.63>;tag=8a72a84d-70f6-4225-985d-88602df8fa26
To: <sip:100@>;tag=00146a743a22000510aa214c-40067a45
Call-ID: e5bc287f-035b-4f9c-ac20-eb6ec431ab21
CSeq: 5835 OPTIONS
Server: Cisco-CP7960G/8.0
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE
Accept: application/sdp,multipart/mixed,multipart/alternative
Accept-Encoding: identity
Accept-Language: en
Supported: replaces,join,norefersub
Content-Length: 237
Content-Type: application/sdp
Content-Disposition: session;handling=optional

v=0
o=Cisco-SIPUA 11652 0 IN IP4 
s=SIP Call
t=0 0
m=audio 0 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

<--- Transmitting SIP request (430 bytes) to UDP::5060 --->
OPTIONS sip:sip5.ovh.fr:5060 SIP/2.0
Via: SIP/2.0/UDP :5060;rport;branch=z9hG4bKPj09d26392-a71e-480a-bb72-6b62d6abfe50
From: <sip:@192.168.20.63>;tag=1c54dc09-9afc-4fd9-8f09-436640befc7d
To: <sip:sip5.ovh.fr>
Contact: <sip:@:5060>
Call-ID: 5b41b6d7-881c-4829-b753-f5197c11ee31
CSeq: 8304 OPTIONS
Max-Forwards: 70
User-Agent: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP response (381 bytes) from UDP::5060 --->
SIP/2.0 501 Not Implemented
Call-ID: 5b41b6d7-881c-4829-b753-f5197c11ee31
CSeq: 8304 OPTIONS
From: <sip:@192.168.20.63>;tag=1c54dc09-9afc-4fd9-8f09-436640befc7d
To: <sip:sip5.ovh.fr>;tag=00-32196-14667398e-63f7e53c
Via: SIP/2.0/UDP :5060;received=;rport=10913;branch=z9hG4bKPj09d26392-a71e-480a-bb72-6b62d6abfe50
Content-Length: 0


<--- Received SIP request (550 bytes) from UDP::32157 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK19e27d31
From: <sip:101@>;tag=000821acfdba05be6d37c318-0476b638
To: <sip:101@>
Call-ID: 000821ac-fdba0002-68d5d79d-4c85d36d@
Max-Forwards: 70
Date: Fri, 11 Dec 2020 23:38:15 GMT
CSeq: 1488 REGISTER
User-Agent: Cisco-CP7940G/8.0
Contact: <sip:101@:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-000821acfdba>";+u.sip!model.ccm.cisco.com="8"
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (509 bytes) to UDP::5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP :5060;received=;branch=z9hG4bK19e27d31
Call-ID: 000821ac-fdba0002-68d5d79d-4c85d36d@
From: <sip:101@>;tag=000821acfdba05be6d37c318-0476b638
To: <sip:101@>;tag=z9hG4bK19e27d31
CSeq: 1488 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1607729917/9f2de0bbfe43a7d43a545c65c4597e60",opaque="09ebee1f642581ab",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.1.0
Content-Length:  0


<--- Received SIP request (544 bytes) from UDP::19278 --->
REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK0f003a5c
From: <sip:102@>;tag=00078551fbf001b0393774fb-3b8804a9
To: <sip:102@>
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
Max-Forwards: 70
Date: Fri, 11 Dec 2020 23:38:34 GMT
CSeq: 390 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: <sip:102@:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00078551fbf0>";+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120


<--- Transmitting SIP response (504 bytes) to UDP::5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP :5060;received=;branch=z9hG4bK0f003a5c
Call-ID: 00078551-fbf00002-29eea32e-2f02255a@192.168.1.140
From: <sip:102@>;tag=00078551fbf001b0393774fb-3b8804a9
To: <sip:102@>;tag=z9hG4bK0f003a5c
CSeq: 390 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1607729917/83a260912d0dbcf5ddbdc8e80d1f54f0",opaque="05b11d8c51346198",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.1.0
Content-Length:  0

Here is failed and working 100 it’s my bedroom phone who successfully registers.

here is my pjwizar conf

[users](!)
type=wizard
accepts_registrations=yes
sends_registrations=no
accepts_auth=yes
sends_auth=no
endpoint/context=home
endpoint/allow=!all,ulaw,alaw,gsm
endpoint/force_rport=no
endpoint/rewrite_contact=yes
endpoint/rtp_symmetric=yes
aor/max_contacts=10
aor/qualify_frequency=15

[100](users)
fullname=ChLouis
inbound_auth/username=100
inbound_auth/password=

[101](users)
fullname=ChGabriel
inbound_auth/username=101
inbound_auth/password=

[102](users)
fullname=Cuisine
inbound_auth/username=102
inbound_auth/password=

[103](users)
fullname=ChMaitre
inbound_auth/username=103
inbound_auth/password=

[104](users)
fullname=ChStudio
inbound_auth/username=104
inbound_auth/password=

here is my pjsip conf

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
local_net=192.168.20.0/24
external_media_address=21
external_signaling_address=2

[homesip_reg]
type=registration
transport=transport-udp
outbound_auth=homesip_auth
server_uri=sip:sip5.ovh.fr:5060
client_uri=sip:@sip5.ovh.fr:5060
retry_interval=60
max_retries=10
expiration=3600
line=yes
endpoint=homesip

[homesip_auth]
type=auth
auth_type=userpass
password=
username=
realm=sip5.ovh.fr

[homesip]
type=aor
contact=sip:sip5.ovh.fr:5060
qualify_frequency=5
remove_existing=yes

[homesip]
disallow=all
type=endpoint
transport=transport-udp
context=homesip-in
from_user=
rtp_symmetric = yes
force_rport = yes
rewrite_contact = yes
allow = alaw,ulaw,gsm
direct_media=no
aors=homesip
outbound_auth=homesip_auth

[homesip]
type=identify
endpoint=homesip
match=sip5.ovh.fr

100 is doing a two exchange register, not a single exchange one, is providing authentication data:

102 is giving up after the 401, which means it doesn’t have enough information to construct the equivalent of the above. This needs to be fixed in the phone.

The failing phone is authenticating as 102, but you only have 100 and 101 in your configuration. However that would break the registration dialogue in different ways, so I still don’t think the phone knows how to authenticate itself.

I fixed my problem. If I make force_rpot=yes all my phones register. But now other problem, they can’t be called, and when they call don’t hear the sound of the caller

<--- Received SIP request (688 bytes) from UDP::19278 --->
BYE sip::5060 SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK762f5169
From: "Cuisine" <sip:102@>;tag=00078551fbf0047601a403f8-6cd1f7b8
To: <sip:100@>;tag=a9d58d2d-0f3b-4c19-b5b1-b3e6f5d1a3b6
Call-ID: 00078551-fbf0000b-34f52117-53e80b93@
Max-Forwards: 70
Date: Sat, 12 Dec 2020 10:17:17 GMT
CSeq: 103 BYE
User-Agent: Cisco-CP7960G/8.0
Content-Length: 0
Authorization: Digest username="102",realm="asterisk",uri="sip::5060",response="ce426dd0317d0cb9ff46e13fac9e9e15",nonce="1607768160/98ef1ab3daaa10c7a504a6888e67440c",opaque="0007951527d74f57",cnonce="2add256a",qop=auth,nc=00000002,algorithm=md5


<--- Transmitting SIP response (402 bytes) to UDP::5060 --->
SIP/2.0 481 Call/Transaction Does Not Exist
Via: SIP/2.0/UDP :5060;received=;branch=z9hG4bK762f5169
Call-ID: 00078551-fbf0000b-34f52117-53e80b93@
From: "Cuisine" <sip:102@>;tag=00078551fbf0047601a403f8-6cd1f7b8
To: <sip:100@>;tag=a9d58d2d-0f3b-4c19-b5b1-b3e6f5d1a3b6
CSeq: 103 BYE
Server: Asterisk PBX 18.1.0
Content-Length:  0

EDIT: fixed this problem using direct_media=no but the phone does not detect when we end the call and stays connected

Cisco phones are not good choices for complex NAT environments. At least for the original SIP firmware, it was designed for use in corporate networks, so had no NAT support. You should use a VPN, so that everything looks like a simple local network.

The fact is they worked all well before I moved from SIP to PJSIP and from my VPS to my home network outside where the phones are… But how can I configure a VPN into the phones?

You need to configure VPN into the router that is doing the NAT for the phones.

Okay, after hours of try. I decided to downgrade to CHAN_SIP and wow everything is now working very well in 15 minutes I resolved all my problems by just turning back to the good old CHAN SIP who works really well! Thanks for your help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.