Hi everyone,
First a little bit of context, I’m brand new in the FreePBX world and I would like to setup a small IP phone network (4 to 5 devices) for our company.
What do I run:
I’m running FreePBX v17.0.19.23 with Asterisk 21.4.3 on a virtual machine (HP Proliant running XCP-ng) and purchased 2 inexpensive Grandstream GXP1620 to test the setup. Firmware versions of the phone are the latest (1.0.7.70)
My problem is:
I created two pjsip extensions (201 & 202) and configured the IP phones accordingly. For extension 201, the phone can register without any issue, but I can’t register extension 202 for some reason.
What I already tried:
- Deleting the extension and recreate a new one → Same result
- Configure the working extension on the non-working phone and vice-versa → No differences, 201 can still register but not 202. So I don’t think the issue is related to the phone configuration.
- Change the password to only numbers in FreePBX and in the phone configuration → No difference.
- Rebooting the PBX server and the phones but no changes.
- Since my phones aren’t in the same subnet than the server, edited the value of “Match (Permit)” to “192.168.0.0/24,192.168.2.0/24”
- Swearing and cursing it, but so far no changes
Configuration / log
Here are the meaningful phone settings (or at least those I think are )

Extension 202 have the same parameters, except for the different credentials.
When I look at the registration exchange for extension 202, I have the following:
2025/01/29 11:58:54.750623 192.168.0.40:5060 → 192.168.2.55:5060
REGISTER sip:192.168.2.55 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.40:5060;branch=z9hG4bK1150044087;rport
From: sip:[email protected];tag=278030927
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 2000 REGISTER
Contact: sip:[email protected]:5060;reg-id=1;+sip.instance=“urn:uuid:00000000-0000-1000-8000-C074ADE5AE11”
Max-Forwards: 70
User-Agent: Grandstream GXP1620 1.0.7.70
Supported: path
Expires: 3600
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
2025/01/29 11:58:54.751958 192.168.2.55:5060 → 192.168.0.40:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.40:5060;rport=5060;received=192.168.0.40;branch=z9hG4bK1150044087
Call-ID: [email protected]
From: sip:[email protected];tag=278030927
To: sip:[email protected];tag=z9hG4bK1150044087
CSeq: 2000 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1738148334/42e0d7a594e879d0d602e847fc8e6e9e”,opaque=“060b736c4642da5d”,algorithm=MD5,qop=“auth”
Server: FPBX-17.0.19.23(21.4.3)
Content-Length: 0
2025/01/29 11:58:54.790113 192.168.0.40:5060 → 192.168.2.55:5060
REGISTER sip:192.168.2.55 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.40:5060;branch=z9hG4bK9040555;rport
From: sip:[email protected];tag=278030927
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 2001 REGISTER
Contact: sip:[email protected]:5060;reg-id=1;+sip.instance=“urn:uuid:00000000-0000-1000-8000-C074ADE5AE11”
Authorization: Digest username=“202”, realm=“asterisk”, nonce=“1738148334/42e0d7a594e879d0d602e847fc8e6e9e”, uri=“sip:192.168.2.55”, response=“6bc6b1
f08c93df9569be2a09c346ef63”, algorithm=MD5, cnonce=“13300045”, opaque=“060b736c4642da5d”, qop=auth, nc=00000001
Max-Forwards: 70
User-Agent: Grandstream GXP1620 1.0.7.70
Supported: path
Expires: 3600
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
2025/01/29 11:58:54.790958 192.168.2.55:5060 → 192.168.0.40:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.40:5060;rport=5060;received=192.168.0.40;branch=z9hG4bK9040555
Call-ID: [email protected]
From: sip:[email protected];tag=278030927
To: sip:[email protected];tag=z9hG4bK9040555
CSeq: 2001 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1738148334/42e0d7a594e879d0d602e847fc8e6e9e”,opaque=“5e51ff4659346c34”,algorithm=MD5,qop=“auth”
Server: FPBX-17.0.19.23(21.4.3)
Content-Length: 0
It does that a couple of time and then the IP gets ban by the fail2ban.
If I look at the registration for extension 201, I have the same exchange, however when it sends the “Authorization” block the second time, I receive a 200 answer instead of the 401 and registration is successful.
The extensions are created as followed in FreePBX (identical):
And the pgsip.auth.conf file is:
[0]
#include pjsip.auth_custom.conf
[201-auth]
type=auth
auth_type=userpass
password=MyPassword
username=201
[202-auth]
type=auth
auth_type=userpass
password=MyOtherPassword
username=202
(I tried to set only numerical password just in case, but didn’t change anything).
I’m probably missing something stupid but I can’t figure it out. Any idea of what I could do to make it work ?
I hope I provided enough for you to help me, if not let me know.
Many thanks,