Anyone get pjsip to work with Snom phones?

I have a couple new 7-series and some older 3-series Snom phones.
I tried changing the sip port on the snom, which didn’t work. Then tried changing the sip port on Freepbx which didn’t work. Eventually the firewall bans my phone, unless I white list it.
Tips or tricks?

After you set the port on the PBX you need to restart the PBX.

Please provide logs as you attempt to register these phones.
https://wiki.freepbx.org/display/SUP/Providing+Great+Debug#ProvidingGreatDebug-AsteriskLogs

Ok.
I setup an extension 116 with sip. Confirmed working and registered.
Then I used Freepbx to convert extension 116 to pjsip which is listening already setup on port 5061.
For this extension Freepbx says, “This device uses PJSIP technology listening on Port 5061 (UDP - this is a NON STANDARD port)”
In the snom 320 phone I changed the Sip network identity port to 5061 and the phone reboots. Phone not registered. I send another register request via the snom and I get fail2ban notice.

Here is the cli log below.
Odd it says bad password, since the password in freepbx gui and the phone are unchanged from when it was working fine as SIP.
I did try retyping the password into the snom at one point, but still failing.
I did try creating a pjsip extension from scratch instead of converting in Freepbx from sip to pjsip - but still failing.

[2018-06-06 16:17:31] DEBUG[6107]: acl.c:957 ast_ouraddrfor: For destination ‘192.168.0.100’, our source address is ‘192.168.0.x’.
[2018-06-06 16:17:31] DEBUG[6107]: chan_sip.c:3916 ast_sip_ouraddrfor: Setting AST_TRANSPORT_UDP with address 192.168.0.x:5060
[2018-06-06 16:17:31] DEBUG[6107]: chan_sip.c:9017 __sip_alloc: Allocating new SIP dialog for 3c26701682a7-ccl3ljmj014f - REGISTER (No RTP)
[2018-06-06 16:17:31] DEBUG[6107]: chan_sip.c:28827 handle_incoming: **** Received REGISTER (2) - Command in SIP REGISTER
[2018-06-06 16:17:31] DEBUG[6107]: chan_sip.c:3759 __sip_xmit: Trying to put ‘SIP/2.0 401’ onto UDP socket destined for 192.168.0.100:5061
[2018-06-06 16:17:31] DEBUG[6107]: chan_sip.c:28827 handle_incoming: **** Received REGISTER (2) - Command in SIP REGISTER
[2018-06-06 16:17:31] DEBUG[6107]: chan_sip.c:3759 __sip_xmit: Trying to put ‘SIP/2.0 403’ onto UDP socket destined for 192.168.0.100:5061
[2018-06-06 16:17:31] NOTICE[6107]: chan_sip.c:28684 handle_request_register: Registration from ‘“116” sip:[email protected]’ failed for ‘192.168.0.100:5061’ - Wrong password
[2018-06-06 16:17:31] DEBUG[6107]: chan_sip.c:29130 handle_request_do: SIP message could not be handled, bad request: 3c26701682a7-ccl3ljmj014f
[2018-06-06 16:17:31] DEBUG[6107]: chan_sip.c:9017 __sip_alloc: Allocating new SIP dialog for [email protected]:5060 - OPTIONS (No RTP)
[2018-06-06 16:17:31] DEBUG[6107]: acl.c:957 ast_ouraddrfor: For destination ‘64.2.142.189’, our source address is ‘192.168.0.x’.
[2018-06-06 16:17:31] DEBUG[6107]: chan_sip.c:3883 ast_sip_ouraddrfor: Target address 64.2.142.189:5060 is not local, substituting externaddr
[2018-06-06 16:17:31] DEBUG[6107]: chan_sip.c:3916 ast_sip_ouraddrfor: Setting AST_TRANSPORT_UDP with address 72.214.54.122:5060
[2018-06-06 16:17:31] DEBUG[6107]: chan_sip.c:8806 change_callid_pvt: SIP call-id changed from ‘[email protected]:5060’ to '[email protected]

Snom status page
[email protected]: Network Failure

Here is sip trace from the Snom phone - snom320-SIP 7.3.14 14953

Sent to udp:192.168.0.x:5060 at 23/12/2001 19:00:22:548 (699 bytes):

REGISTER sip:192.168.0.x SIP/2.0
Via: SIP/2.0/UDP 192.168.0.100:5061;branch=z9hG4bK-hrp5qrfa9iy8;rport
From: “116” sip:[email protected];tag=qynd387trn
To: “116” sip:[email protected]
Call-ID: 3c26701682a7-ccl3ljmj014f
CSeq: 1 REGISTER
Max-Forwards: 70
Contact: sip:[email protected]:5061;line=05b1kj3g;q=1.0;reg-id=1;+sip.instance=“urn:uuid:c477ae03-832c-43f0-a1ea-128d37831e9c”;audio;mobility=“fixed”;duplex=“full”;description=“snom320”;actor=“principal”;events=“dialog”;methods=“INVITE,ACK,CANCEL,BYE,REFER,OPTIONS,NOTIFY,SUBSCRIBE,PRACK,MESSAGE,INFO”
User-Agent: snom320/7.3.14
Supported: gruu
Allow-Events: dialog
X-Real-IP: 192.168.0.100
Expires: 3600
Content-Length: 0

Received from udp:192.168.0.x:5060 at 23/12/2001 19:00:22:887 (527 bytes):

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.100:5061;branch=z9hG4bK-hrp5qrfa9iy8;received=192.168.0.100;rport=5061
From: “116” sip:[email protected];tag=qynd387trn
To: “116” sip:[email protected];tag=as211a5b2a
Call-ID: 3c26701682a7-ccl3ljmj014f
CSeq: 1 REGISTER
Server: FPBX-14.0.3.2(14.7.5)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“1b04955e”
Content-Length: 0

That’s the port number on the snom end, not what you want to change.
I know nothing about snom but would guess that you need to set
Registrar: 192.168.0.x:5061

If you need to put the PBX IP address into other phone settings, add :5061 there, too.

1 Like

You are kind and a true genius Stewart.
It worked!!!
I deleted the port identity field in the advanced section. Left it blank (default).
Then added the port number for the registrar as you described above. I only needed to add the port to the registrar number for the specific ‘sip identity’ I was using. Just those two changes from a default setup.

Did I say it worked!!! Woohoo!
Thank you.
Now I can move all my extensions to pjsip as extra assurance that my extensions won’t go down if internet failure (I have one pstn main number). I have my DNS settings already placed that should avoid the issue, but pjsip is the way forward anyway. Need to stay current.

It still doesn’t want to display the extension number on the lcd screen, but that is a phone thing and what post-its are for.

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