FreePBX + EPM + Sangoma P315

I am running FreePBX 16.0.21.9 and using a Sangoma P315 running firmware 3.7.2. When I configure the phone manually, everything works fine. However, when I provision the phone through EPM, everything works fine except I can’t dial other extensions. Nor can I dial out to the PSTN. I can’t call anywhere. I am using the default template to provision the phone. I can use the contact app, I can change my status, I can receive calls without issue. If I switch the phone back to manual setup, I can make calls again.

Here is a dump from sngrep:

         10.4.16.41:5060                10.4.6.25:5060  
      ──────────┬─────────          ──────────┬─────────
                β”‚        INVITE (SDP)         β”‚         

18:43:22.712434 β”‚ ──────────────────────────> β”‚
+0.000703 β”‚ 401 Unauthorized β”‚
18:43:22.713137 β”‚ <────────────────────────── β”‚
+0.074255 β”‚ ACK β”‚
18:43:22.787392 β”‚ ──────────────────────────> β”‚

2022/08/19 18:43:22.712434 10.4.16.41:5060 β†’ 10.4.6.25:5060
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.4.16.41:5060;rport;branch=z9hG4bKPj0731b632-0a22-4768-9ca4-c19818b468b2
Max-Forwards: 70
From: β€œ403” sip:[email protected];tag=5d1e9a09-d98d-4ad4-84af-68687a7107e8
To: sip:[email protected]
Contact: β€œ403” sip:[email protected]:5060;ob
Call-ID: 6b87f713-84d2-4a2f-b123-bc7ae31d47d2
CSeq: 27055 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: Sangoma P315 3_7_2 000FD3CFEC32
Content-Type: application/sdp
Content-Length: 635

v=0
o=- 356316690 356316690 IN IP4 10.4.16.41
s=digphn
b=AS:84
t=0 0
a=X-nat:0
m=audio 4014 RTP/AVP 0 8 9 111 107 18 118 58 58 96
c=IN IP4 10.4.16.41
b=TIAS:64000
a=rtcp:4015 IN IP4 10.4.16.41
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:107 opus/48000/2
a=fmtp:107 cbr=1;maxptime=20;maxplaybackrate=16000;maxaveragebitrate=20000;sprop-maxcapturerate=16000;usedtx=0
a=rtpmap:18 G729/8000
a=rtpmap:118 L16/8000
a=rtpmap:58 L16/16000
a=rtpmap:58 L16-256/16000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=ssrc:1977456492 cname:5cd5478c531237a6

If that trace is complete, the phone has no password set.

I’ve tried to figure out what you mean by this. I suppose it’s self evident, but I am not sure what I am doing wrong. In this configuration the phone is being provisioned through EPM. Incoming calls, access to the contacts list, etc. all work. So if the phone is missing the password, how would I even set that? Where would I do it?

401 is a request to prove it knows the password. It should be followed by an INVITE which contains an authentication code based on that password. If the phone doesn’t respond to 401, it means it doesn’t have the information it needs in order to be able to respond.

If it got no response at all, it would not have sent an ACK, so it is clearly seeing the 401, but is unable to satisfy it, which means no password.

I don’t know why the phone wouldn’t have the password when it’s been provisioned through EPM. But more importantly, I have no idea how to fix that. The PBX has a proper cert, I can register P330’s without issue.

If anyone has any ideas, I’d appreciate any help.

If anything appears in sngrep within one second after the ACK, post that.

If anything appears in the Asterisk log for the attempted call, paste that at pastebin.freepbx.org and post the link here.

I don’t see anything in the log around the time of the failed call. I think I missed some of the data in my last post. Here is another attempt. This is the failed call event and then the event that occurred immediately after.

2022/08/20 16:17:35.673111 10.4.16.41:5060 β†’ 10.4.6.25:5060
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.4.16.41:5060;rport;branch=z9hG4bKPj28f6983b-64c0-4da1-af91-58e7506d5aa3
Max-Forwards: 70
From: β€œ403” sip:[email protected];tag=b85362cc-8e29-4133-842b-a67749854205
To: sip:[email protected]
Contact: β€œ403” sip:[email protected]:5060;ob
Call-ID: e122f4a1-a026-43b2-8437-2635238285c8
CSeq: 13497 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: Sangoma P315 3_7_2 000FD3CFEC32
Content-Type: application/sdp
Content-Length: 635

v=0
o=- 356394350 356394350 IN IP4 10.4.16.41
s=digphn
b=AS:84
t=0 0
a=X-nat:0
m=audio 4014 RTP/AVP 0 8 9 111 107 18 118 58 58 96
c=IN IP4 10.4.16.41
b=TIAS:64000
a=rtcp:4015 IN IP4 10.4.16.41
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:107 opus/48000/2
a=fmtp:107 cbr=1;maxptime=20;maxplaybackrate=16000;maxaveragebitrate=20000;sprop-maxcapturerate=16000;usedtx=0
a=rtpmap:18 G729/8000
a=rtpmap:118 L16/8000
a=rtpmap:58 L16/16000
a=rtpmap:58 L16-256/16000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=ssrc:1976330887 cname:1ff5bba208da6976

2022/08/20 16:17:35.673837 10.4.6.25:5060 β†’ 10.4.16.41:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.4.16.41:5060;rport=5060;received=10.4.16.41;branch=z9hG4bKPj28f6983b-64c0-4da1-af91-58e7506d5aa3
Call-ID: e122f4a1-a026-43b2-8437-2635238285c8
From: β€œ403” sip:[email protected];tag=b85362cc-8e29-4133-842b-a67749854205
To: sip:[email protected];tag=z9hG4bKPj28f6983b-64c0-4da1-af91-58e7506d5aa3
CSeq: 13497 INVITE
WWW-Authenticate: Digest realm=β€œasterisk”,nonce=β€œ1661023055/a546e498bec6a779c5fb3acd44efd676”,opaque=β€œ4b8eaaea05b17693”,algorithm=MD5,qop=β€œauth”
Server: FPBX-16.0.21.9(16.27.0)
Content-Length: 0

2022/08/20 16:17:35.752515 10.4.16.41:5060 β†’ 10.4.6.25:5060
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.4.16.41:5060;rport;branch=z9hG4bKPj28f6983b-64c0-4da1-af91-58e7506d5aa3
Max-Forwards: 70
From: β€œ403” sip:[email protected];tag=b85362cc-8e29-4133-842b-a67749854205
To: sip:[email protected];tag=z9hG4bKPj28f6983b-64c0-4da1-af91-58e7506d5aa3
Call-ID: e122f4a1-a026-43b2-8437-2635238285c8
CSeq: 13497 ACK
Content-Length: 0

2022/08/20 16:17:35.932516 10.4.16.41:5060 β†’ 10.4.6.25:5060
REGISTER sip:MYFQDN:5060 SIP/2.0
Via: SIP/2.0/UDP 10.4.16.41:5060;rport;branch=z9hG4bKPjbe2f32eb-35a5-4222-a269-e085927e1dc4
Max-Forwards: 70
From: β€œ403” sip:[email protected];tag=fd8c00a7-ab13-4cba-bfd2-0c4e9ecddf7e
To: β€œ403” sip:[email protected]
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
CSeq: 13435 REGISTER
User-Agent: Sangoma P315 3_7_2 000FD3CFEC32
Contact: β€œ403” sip:[email protected]:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0

2022/08/20 16:17:35.933257 10.4.6.25:5060 β†’ 10.4.16.41:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.4.16.41:5060;rport=5060;received=10.4.16.41;branch=z9hG4bKPjbe2f32eb-35a5-4222-a269-e085927e1dc4
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
From: β€œ403” sip:[email protected];tag=fd8c00a7-ab13-4cba-bfd2-0c4e9ecddf7e
To: β€œ403” sip:[email protected];tag=z9hG4bKPjbe2f32eb-35a5-4222-a269-e085927e1dc4
CSeq: 13435 REGISTER
WWW-Authenticate: Digest realm=β€œasterisk”,nonce=β€œ1661023055/a546e498bec6a779c5fb3acd44efd676”,opaque=β€œ116e7f514455c0f1”,algorithm=MD5,qop=β€œauth”
Server: FPBX-16.0.21.9(16.27.0)
Content-Length: 0

2022/08/20 16:17:36.067593 10.4.16.41:5060 β†’ 10.4.6.25:5060
REGISTER sip:MYFQDN:5060 SIP/2.0
Via: SIP/2.0/UDP 10.4.16.41:5060;rport;branch=z9hG4bKPjbe32d5cf-4156-4560-9356-920a2c51601c
Max-Forwards: 70
From: β€œ403” sip:[email protected];tag=fd8c00a7-ab13-4cba-bfd2-0c4e9ecddf7e
To: β€œ403” sip:[email protected]
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
CSeq: 13436 REGISTER
User-Agent: Sangoma P315 3_7_2 000FD3CFEC32
Contact: β€œ403” sip:[email protected]:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: Digest username=β€œ403”, realm=β€œasterisk”, nonce=β€œ1661023055/a546e498bec6a779c5fb3acd44efd676”, uri=β€œsip:MYFQDN:5060”, response=β€œ5882333841fa7ecf410d2e3511
96d9”, algorithm=MD5, cnonce=β€œ346c9154-6ce5-4bf6-8a26-bf43ba1283c3”, opaque=β€œ116e7f514455c0f1”, qop=auth, nc=00000001
Content-Length: 0

2022/08/20 16:17:36.068926 10.4.6.25:5060 β†’ 10.4.16.41:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.4.16.41:5060;rport=5060;received=10.4.16.41;branch=z9hG4bKPjbe32d5cf-4156-4560-9356-920a2c51601c
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
From: β€œ403” sip:[email protected];tag=fd8c00a7-ab13-4cba-bfd2-0c4e9ecddf7e
To: β€œ403” sip:[email protected];tag=z9hG4bKPjbe32d5cf-4156-4560-9356-920a2c51601c
CSeq: 13436 REGISTER
Date: Sat, 20 Aug 2022 19:17:36 GMT
Contact: sip:[email protected]:5060;ob;expires=299
Expires: 300
Server: FPBX-16.0.21.9(16.27.0)
Content-Length: 0

2022/08/20 16:20:05.207565 10.4.16.41:5060 β†’ 10.4.6.25:5060
REGISTER sip:MYFQDN:5060 SIP/2.0
Via: SIP/2.0/UDP 10.4.16.41:5060;rport;branch=z9hG4bKPjc5282802-5de6-46b1-9a1e-615b0f897a87
Max-Forwards: 70
From: β€œ403” sip:[email protected];tag=a55f360f-8628-46d8-912c-68ffe79ff753
To: β€œ403” sip:[email protected]
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
CSeq: 13437 REGISTER
User-Agent: Sangoma P315 3_7_2 000FD3CFEC32
Contact: β€œ403” sip:[email protected]:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0

2022/08/20 16:20:05.208290 10.4.6.25:5060 β†’ 10.4.16.41:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.4.16.41:5060;rport=5060;received=10.4.16.41;branch=z9hG4bKPjc5282802-5de6-46b1-9a1e-615b0f897a87
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
From: β€œ403” sip:[email protected];tag=a55f360f-8628-46d8-912c-68ffe79ff753
To: β€œ403” sip:[email protected];tag=z9hG4bKPjc5282802-5de6-46b1-9a1e-615b0f897a87
CSeq: 13437 REGISTER
WWW-Authenticate: Digest realm=β€œasterisk”,nonce=β€œ1661023205/7d80291fa750f4638b4c805c538d09cf”,opaque=β€œ0dd827fd7d56a520”,algorithm=MD5,qop=β€œauth”
Server: FPBX-16.0.21.9(16.27.0)
Content-Length: 0

2022/08/20 16:20:05.282875 10.4.16.41:5060 β†’ 10.4.6.25:5060
REGISTER sip:MYFQDN:5060 SIP/2.0
Via: SIP/2.0/UDP 10.4.16.41:5060;rport;branch=z9hG4bKPj622aa490-4323-4bf7-a1ac-da5683ae3dca
Max-Forwards: 70
From: β€œ403” sip:[email protected];tag=a55f360f-8628-46d8-912c-68ffe79ff753
To: β€œ403” sip:[email protected]
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
CSeq: 13438 REGISTER
User-Agent: Sangoma P315 3_7_2 000FD3CFEC32
Contact: β€œ403” sip:[email protected]:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: Digest username=β€œ403”, realm=β€œasterisk”, nonce=β€œ1661023205/7d80291fa750f4638b4c805c538d09cf”, uri=β€œsip:MYFQDN:5060”, response=β€œ6a457c8f6873d2c24ced7e9cc4
f3b8”, algorithm=MD5, cnonce=β€œ346c9154-6ce5-4bf6-8a26-bf43ba1283c3”, opaque=β€œ0dd827fd7d56a520”, qop=auth, nc=00000001
Content-Length: 0

2022/08/20 16:20:05.284250 10.4.6.25:5060 β†’ 10.4.16.41:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.4.16.41:5060;rport=5060;received=10.4.16.41;branch=z9hG4bKPj622aa490-4323-4bf7-a1ac-da5683ae3dca
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
From: β€œ403” sip:[email protected];tag=a55f360f-8628-46d8-912c-68ffe79ff753
To: β€œ403” sip:[email protected];tag=z9hG4bKPj622aa490-4323-4bf7-a1ac-da5683ae3dca
CSeq: 13438 REGISTER
Date: Sat, 20 Aug 2022 19:20:05 GMT
Contact: sip:[email protected]:5060;ob;expires=299
Expires: 300
Server: FPBX-16.0.21.9(16.27.0)
Content-Length: 0

2022/08/20 16:22:34.407158 10.4.16.41:5060 β†’ 10.4.6.25:5060
REGISTER sip:MYFQDN:5060 SIP/2.0
Via: SIP/2.0/UDP 10.4.16.41:5060;rport;branch=z9hG4bKPj3221c525-b962-4f3a-9b3b-660b7fe3f030
Max-Forwards: 70
From: β€œ403” sip:[email protected];tag=a7c61cb7-843a-4b83-a75e-d8ea101044b6
To: β€œ403” sip:[email protected]
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
CSeq: 13439 REGISTER
User-Agent: Sangoma P315 3_7_2 000FD3CFEC32
Contact: β€œ403” sip:[email protected]:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0

2022/08/20 16:22:34.407851 10.4.6.25:5060 β†’ 10.4.16.41:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.4.16.41:5060;rport=5060;received=10.4.16.41;branch=z9hG4bKPj3221c525-b962-4f3a-9b3b-660b7fe3f030
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
From: β€œ403” sip:[email protected];tag=a7c61cb7-843a-4b83-a75e-d8ea101044b6
To: β€œ403” sip:[email protected];tag=z9hG4bKPj3221c525-b962-4f3a-9b3b-660b7fe3f030
CSeq: 13439 REGISTER
WWW-Authenticate: Digest realm=β€œasterisk”,nonce=β€œ1661023354/c0c05334fa863ba9c0099cdee0e8e6fc”,opaque=β€œ2083f7075e890308”,algorithm=MD5,qop=β€œauth”
Server: FPBX-16.0.21.9(16.27.0)
Content-Length: 0

2022/08/20 16:22:34.487531 10.4.16.41:5060 β†’ 10.4.6.25:5060
REGISTER sip:MYFQDN:5060 SIP/2.0
Via: SIP/2.0/UDP 10.4.16.41:5060;rport;branch=z9hG4bKPj95225082-f02d-45d7-84ff-30f37770af76
Max-Forwards: 70
From: β€œ403” sip:[email protected];tag=a7c61cb7-843a-4b83-a75e-d8ea101044b6
To: β€œ403” sip:[email protected]
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
CSeq: 13440 REGISTER
User-Agent: Sangoma P315 3_7_2 000FD3CFEC32
Contact: β€œ403” sip:[email protected]:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: Digest username=β€œ403”, realm=β€œasterisk”, nonce=β€œ1661023354/c0c05334fa863ba9c0099cdee0e8e6fc”, uri=β€œsip:MYFQDN:5060”, response=β€œ91d43b84ed565f724f6964ba7e
ba65”, algorithm=MD5, cnonce=β€œ346c9154-6ce5-4bf6-8a26-bf43ba1283c3”, opaque=β€œ2083f7075e890308”, qop=auth, nc=00000001
Content-Length: 0

2022/08/20 16:22:34.488862 10.4.6.25:5060 β†’ 10.4.16.41:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.4.16.41:5060;rport=5060;received=10.4.16.41;branch=z9hG4bKPj95225082-f02d-45d7-84ff-30f37770af76
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
From: β€œ403” sip:[email protected];tag=a7c61cb7-843a-4b83-a75e-d8ea101044b6
To: β€œ403” sip:[email protected];tag=z9hG4bKPj95225082-f02d-45d7-84ff-30f37770af76
CSeq: 13440 REGISTER
Date: Sat, 20 Aug 2022 19:22:34 GMT
Contact: sip:[email protected]:5060;ob;expires=299
Expires: 300
Server: FPBX-16.0.21.9(16.27.0)
Content-Length: 0

2022/08/20 16:25:03.647301 10.4.16.41:5060 β†’ 10.4.6.25:5060
REGISTER sip:MYFQDN:5060 SIP/2.0
Via: SIP/2.0/UDP 10.4.16.41:5060;rport;branch=z9hG4bKPj1653fb1d-8355-4031-a3d6-c17eca04bc24
Max-Forwards: 70
From: β€œ403” sip:[email protected];tag=385df12d-ce6f-49cc-a041-c9d5c4f28d2e
To: β€œ403” sip:[email protected]
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
CSeq: 13441 REGISTER
User-Agent: Sangoma P315 3_7_2 000FD3CFEC32
Contact: β€œ403” sip:[email protected]:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0

2022/08/20 16:25:03.647992 10.4.6.25:5060 β†’ 10.4.16.41:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.4.16.41:5060;rport=5060;received=10.4.16.41;branch=z9hG4bKPj1653fb1d-8355-4031-a3d6-c17eca04bc24
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
From: β€œ403” sip:[email protected];tag=385df12d-ce6f-49cc-a041-c9d5c4f28d2e
To: β€œ403” sip:[email protected];tag=z9hG4bKPj1653fb1d-8355-4031-a3d6-c17eca04bc24
CSeq: 13441 REGISTER
WWW-Authenticate: Digest realm=β€œasterisk”,nonce=β€œ1661023503/e145611fa77120ec52f30b0fd0c3bb5b”,opaque=β€œ6806817736360efb”,algorithm=MD5,qop=β€œauth”
Server: FPBX-16.0.21.9(16.27.0)
Content-Length: 0

2022/08/20 16:25:03.732526 10.4.16.41:5060 β†’ 10.4.6.25:5060
REGISTER sip:MYFQDN:5060 SIP/2.0
Via: SIP/2.0/UDP 10.4.16.41:5060;rport;branch=z9hG4bKPjfbf30c04-48fa-4a82-bf86-37308d7fb866
Max-Forwards: 70
From: β€œ403” sip:[email protected];tag=385df12d-ce6f-49cc-a041-c9d5c4f28d2e
To: β€œ403” sip:[email protected]
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
CSeq: 13442 REGISTER
User-Agent: Sangoma P315 3_7_2 000FD3CFEC32
Contact: β€œ403” sip:[email protected]:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: Digest username=β€œ403”, realm=β€œasterisk”, nonce=β€œ1661023503/e145611fa77120ec52f30b0fd0c3bb5b”, uri=β€œsip:MYFQDN:5060”, response=β€œcd914fd5fced84c2ef6c5e0b09
5bec”, algorithm=MD5, cnonce=β€œ346c9154-6ce5-4bf6-8a26-bf43ba1283c3”, opaque=β€œ6806817736360efb”, qop=auth, nc=00000001
Content-Length: 0

2022/08/20 16:25:03.733900 10.4.6.25:5060 β†’ 10.4.16.41:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.4.16.41:5060;rport=5060;received=10.4.16.41;branch=z9hG4bKPjfbf30c04-48fa-4a82-bf86-37308d7fb866
Call-ID: d259c7d3-daa8-4ca6-a404-b5d366743e12
From: β€œ403” sip:[email protected];tag=385df12d-ce6f-49cc-a041-c9d5c4f28d2e
To: β€œ403” sip:[email protected];tag=z9hG4bKPjfbf30c04-48fa-4a82-bf86-37308d7fb866
CSeq: 13442 REGISTER
Date: Sat, 20 Aug 2022 19:25:03 GMT
Contact: sip:[email protected]:5060;ob;expires=299
Expires: 300
Server: FPBX-16.0.21.9(16.27.0)
Content-Length: 0

It does have the password, because it is correctly responding to the 401 for the REGISTER. I don’t understand why it can’t do the same for the INVITE.

Not sure if this helps, but here is a tcpdump view of the problem. This is still occurring, and I haven’t been able to make any real progress on my own.

https://pastebin.freepbx.org/view/088c3d9e

I’m guessing that the INVITE with the Authorization header is too big and getting fragmented.

Disable most codecs in the phone, e.g. enable only ulaw, alaw, g722 and retest.

I am not sure how to do that. The phone is being provisioned through EPM, so I can’t log into the phone itself. Is there an area to do that inside of EPM?

Also, the phone seems to work fine when it’s not provisioned through EPM. Outbound calls to PSTN numbers or other extensions work normally.

I’m not familiar with this phone but assume that the basefile edit has a section for allowed payloads.

Or, look at the metadata in the pcap file to see whether the INVITE with auth is actually bigger than the MTU.

I found the codec section in the extension page, that made no difference.

Looking through the capture in Wireshark, the length of the largest packet seems to be 1371. Can you think of any way the EPM provisioning would be a necessary condition of this issue? Again, when I reset the phone and force it to use manual setup, it works fine.

False. If you paste lines 60 through 100 (of the tcpdump view you pasted) into an editor, you’ll see 1568 characters. To which you must add 14 bytes MAC overhead, 20 bytes IP overhead, 8 bytes UDP overhead and 41 bytes for each line break being two characters. It’s way over.

Vague, but I suspect that you changed the codecs for the extension in Asterisk, not for the phone. Please confirm that you made the change in EPM, the phone reloaded the config, and the INVITEs it is sending show only payloads 0, 8, 9 and 96.

1 Like

It seems you have solved my problem. Amazing. Thank you.

I see what you’re saying on the INVITE size. I was lazy and too preoccupied with messing around with the PBX, and didn’t put enough thought into my response. Mea cupla. As for changing the supported codecs in the phone through EPM, I’ve never done that before (editing the basefile). But, that’s what seems to have made the phone work. And now that I can step back and see the problem for what it was, along with the solution, it makes perfect sense.

Out of the three codecs you listed, only G722 was listed in the basefile originally. So I removed the others and tested with G722 alone. Is there any benefit to adding alaw and ulaw if G722 is working fine?

Thank you again.

Practically speaking, if you’re dealing with FreePBX as the other end (intermediary) of all of your calling, probably not.

For anyone else who reads this thread later, a couple of other ways to go about making things better here would have been to either enable the compact SIP header support on the device:

https://wiki.sangoma.com/pages/viewpage.action?pageId=225217227#XMLConfiguration3.8.0+-General(SIP)

which would have probably gotten things under the UDP MTU limit,
or to have gone for TCP signaling instead of UDP signaling, which moves the job of packet sizing to the protocol stack, and doesn’t leave things to the chance graces of routers.

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