Asterisk 16.10, PJSIP, SRTP and Snom phones not working

Hi

I have an asterisk 16.10 PBX running with PJSIP. My Yealink phones are working correctly with SRTP enabled. I can make and receive calls

However as soon as I try and use Snom 715 or Snom 300 it doesn’t allow me to phone out. Receiving calls do however work.When making outgoing call from the phone it double dials the number, not sure why.

I have PJSIP setup on Realtime database, changing the media_encryption= ‘no’ doesn’t update my endpoint:

media_encryption : dtls

±----±-----------------+
| id | media_encryption |
±----±-----------------+
| 203 | no |
±----±-----------------+

I have tried enabling and disabling SRTP on the snom and it make no difference.

Any assistance will be appreciated?

Regards

I have done some SIP traces and found that the Snom phones send 2 INVITE packets:

<— Received SIP request (1083 bytes) from UDP:169.255.228.18:2052 —>
INVITE sip:0720163530@pbx-new.desktop.ddns.desktop-ns.co.za;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.4.203:2052;branch=z9hG4bK-n25hnb0ohy9f;rport
From: “203” sip:203@pbx-new.desktop.ddns.desktop-ns.co.za;tag=7f9xnn7gjo
To: sip:0720163530@pbx-new.desktop.ddns.desktop-ns.co.za;user=phone
Call-ID: 3934363730383532313433343331-elxtne2oes9f
CSeq: 1 INVITE
Max-Forwards: 70
User-Agent: snom300/8.7.5.35
Contact: sip:203@192.168.4.203:2052;line=203ey6y9;reg-id=1
X-Serialnumber: 0004132FE96D
P-Key-Flags: keys=“3”
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATE
Allow-Events: talk, hold, refer, call-info
Supported: 100rel, replaces, from-change
Content-Type: application/sdp
Content-Length: 291

v=0
o=root 996421369 996421369 IN IP4 192.168.4.203
s=call
c=IN IP4 192.168.4.203
t=0 0
m=audio 49580 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
a=ptime:20
a=sendrecv

<— Received SIP request (1083 bytes) from UDP:169.255.228.18:2052 —>
INVITE sip:0720163530@pbx-new.desktop.ddns.desktop-ns.co.za;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.4.203:2052;branch=z9hG4bK-n25hnb0ohy9f;rport
From: “203” sip:203@pbx-new.desktop.ddns.desktop-ns.co.za;tag=7f9xnn7gjo
To: sip:0720163530@pbx-new.desktop.ddns.desktop-ns.co.za;user=phone
Call-ID: 3934363730383532313433343331-elxtne2oes9f
CSeq: 1 INVITE
Max-Forwards: 70
User-Agent: snom300/8.7.5.35
Contact: sip:203@192.168.4.203:2052;line=203ey6y9;reg-id=1
X-Serialnumber: 0004132FE96D
P-Key-Flags: keys=“3”
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATE
Allow-Events: talk, hold, refer, call-info
Supported: 100rel, replaces, from-change
Content-Type: application/sdp
Content-Length: 291

v=0
o=root 996421369 996421369 IN IP4 192.168.4.203
s=call
c=IN IP4 192.168.4.203
t=0 0
m=audio 49580 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
a=ptime:20
a=sendrecv

<— Transmitting SIP response (564 bytes) to UDP:169.255.228.18:2052 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.4.203:2052;rport=2052;received=169.255.228.18;branch=z9hG4bK-n25hnb0ohy9f
Call-ID: 3934363730383532313433343331-elxtne2oes9f
From: “203” sip:203@pbx-new.desktop.ddns.desktop-ns.co.za;tag=7f9xnn7gjo
To: sip:0720163530@pbx-new.desktop.ddns.desktop-ns.co.za;user=phone;tag=z9hG4bK-n25hnb0ohy9f
CSeq: 1 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1603310760/91cf0c30c01fbe779d05e816afe69f5a”,opaque=“7404df5e5be2aec5”,algorithm=md5,qop=“auth”
Server: Asterisk PBX 16.14.0
Content-Length: 0

Without the timestamps, for which you need to use the log files, not screen scrapes, that isn’t particularly significant. It just means the phone is impatient for a response, but doesn’t show whether the impatience is justified.

However, if the exchange stops after the 401, it means that the phone hasn’t been configured with the information needed to authenticate itself.

Will a pcap from the phone it self help?

The info provided was from pjsip set logger on, I have a full trace available.

The pcap from the phone won’t help unless it contains packets that don’t appear in the Asterisk logs. Generally Asterisk logs are much easier for people here to handle, although it does help to use the log file, rather than a console screen scrape.

203-cli.txt (50.3 KB)

Here is the full Asterisk CLI with PJSIP Logger enabled:

CSeq: 3 INVITE

The phone is sending INVITEs out of sequence: 1, 3, 2.

Yes, Just now sure why, it works fine on Chan SIP via Asterisk 13 but with PJSIP is acts like this.

Every single Snom phone is doing the same thing. Snom715 Snom710 and Snom300.

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