PJSIP can not register Panasonic KX-TGP550T04

I have a Panasonic KX-TGP550T04 and the phone can not register with PJSIP, it registers fine with SIP. Is this a known problem?

FreePBX 16.0.21.3
Current Asterisk Version: 16.26.1

If you change an extension from chan_sip (default Bind Port is 5160) to pjsip (default Port to Listen On is 5060), without changing these port numbers, you must change the phone’s configuration to register to the new port.

If that’s not your issue, what (if anything) appears in the Asterisk log when the phone attempts to register?

If nothing, what (if anything) appears in sngrep when the phone attempts to register?

If also nothing, please describe all networking components (routers, firewalls, VPN, VLAN, etc.) between the phone and PBX.

Nothing to it, With PJSIP the phone gets 403( I think. maybe 401), With SIP 200. The password is not super complicated but is 10 characters long. Anywho, I am fine using SIP. I put freepbx on a diet and I run it on a 1GB box.

$ free -m
              total        used        free      shared  buff/cache   available
Mem:            958         459          94          48         403         284
Swap:          2047          19        2028

If you just change the extension to pjsip, the phone will still be talking to the chan_sip driver, which will return a 403 because the extension doesn’t exist.

If you did also change the port number properly, at the Asterisk command prompt, type
pjsip set logger on
paste the Asterisk log for a registration attempt at pastebin.freepbx.org and post the link here.

If you are too new to post links, just post the last 8 hex characters of the URL.

9fe28793

Interesting, because everything looks ok. Likely a bug or limitation on one side or the other.

First, confirm that pjsip works ok with non-Panny phones, to rule out that it isn’t corrupted or incorrectly built.

Next, rule out a field width or character set limitation by setting your 10-character password to have only letters and digits. Use copy/paste between the phone’s GUI and FreePBX, so you are certain that they match. I assume that the extension number contains only digits, no more than 4.

Look at the entry for your extension in /etc/asterisk/pjsip.auth.conf and confirm that username and password match what you entered in the GUI and phone, and that you also have type=auth and auth_type=userpass.

If you get this far, we need to find whether the phone is sending an incorrect response in the Authorization header, or pjsip is checking it incorrectly. Log a failed attempt. Edit eight values in the script below, starting with $authid and ending with $cnonce, to match what’s in your log. Run the script and it will display the correct response value. Compare that to what the phone sent.

#!/usr/bin/perl
use Digest::MD5 qw(md5_hex);

$authid = '3000';
$pass = '1234';
$realm = 'asterisk';
$method = 'REGISTER';
$uri = 'sip.mypbx.domain';
$nonce = '1642729849/2fde6475ba4d765567db00ee1ebefd37';
$nc = '00000001';
$cnonce = 'YX6zR4kGK3~jNsjj';

$enonce = "$nonce:$nc:$cnonce:auth";
$a1 = md5_hex("$authid:$realm:$pass");
$a2 = md5_hex("$method:$uri");
print md5_hex("$a1:$enonce:$a2"), "\n";

I was able to match the response sent by Panasonic with the proper password.
Now I can see nothing can register with PJSIP. Trunks work fine.
I will upgrade the hardware over the weekend and give it another go.

The console logs this upon failure to register res_pjsip/pjsip_distributor.c:676
hxxps://github.com/asterisk/asterisk/blob/7a54badf314ea6e2946b374c21e907a5f106eeb0/res/res_pjsip/pjsip_distributor.c#L676

I am on FreePBX 16.0.19 and Asterisk 16.25.0 Everything seems to be fine now.
Curious why there are no unique LVM labels for each install, it is always SangomaVG
Makes mounting an old drive a little bit harder than it needs to be.
Also the number of times modprobe and assorted utilities are run during the postinstall phase is mind boggling. Should I buy an IBM mainframe to run the GUI? :wink:

If you have a PTR record setup before the installation occurs it will put that into your LVM name