FreePBX with Snom M9 not registering

Hello All,
Has anyone managed to get a Snom M9 base and handset working with FreePBX?
I currently have a brand new, clean install of FreePBX that when I try to register the Snom M9 to returns a 503 Service unavailable in the Snom logs.
Searching for the IP Address of the Snom M9 base in the Asterisk logs returns nothing.
Any ideas what might be going on here?

At the Asterisk command prompt, type
pjsip set logger on
reboot the Snom. Wait two minutes which should be sufficient time for it to attempt registration. Paste the last two minutes of the Asterisk log at pastebin.com and post the link here.

Also, if the Snom is not on the same LAN subnet as the PBX, post details of the network path. If the Snom is registering to a domain name, confirm that the name resolves correctly. Confirm that the Snom shows the correct date and time (network access and name resolution are working).

Thanks Stewart,

The SIP messages to and from SIPgate are the trunk connection which is working fine, however, I can’t see any from the local IP of the Snom M9. The M9 is on the same LAN Subnet, and uses the IP address of the FreePBX server as its connection target. The M9 is using NTP for time syncronisation and is correct.
Screenshot 2024-11-23 215653

Regards

John
Screenshot 2024-11-23 215518
Screenshots of the Snom M9 Log and Status pages.

The response doesn’t seem to be coming from Asterisk. Also the Snom log seems to be in reverse time order.

The times shown on the Snom log are later than the end of the Asterisk log paste, so we can’t be sure that the Snom was attempting to register during the Asterisk logging.

However, I don’t think that’s the issue. I strongly suspect that the ICMP received was a Port Unreachable, Destination Unreachable or similar, and the 503 was created internally by the Snom. Had Asterisk sent a real 503, the Via header would have included a Received tag, and there would have been a Server header.

My first thought is that iptables or other software firewall rules are blocking the REGISTER. Run sngrep or tcpdump on the PBX, which capture incoming packets ahead of any software firewall and see whether the REGISTER requests appear there.

If not, what hardware exists between Snom and PBX? A β€˜smart’ switch might be blocking, or if the devices are connected via different physical ports on the router/firewall, it could be blocking the requests.

1 Like

Thanks Stewart,
This is the result of running tcpdump on the PBX:
08:00:30.707776 IP 192.168.1.13.sip > 192.168.1.80.sip: SIP: REGISTER sip:192.168.1.80 SIP/2.0
08:00:30.707820 IP 192.168.1.80 > 192.168.1.13: ICMP 192.168.1.80 udp port sip unreachable, length 516
08:00:30.712856 IP 192.168.1.13.sip > 192.168.1.80.sip: SIP: REGISTER sip:192.168.1.80 SIP/2.0
08:00:30.712875 IP 192.168.1.80 > 192.168.1.13: ICMP 192.168.1.80 udp port sip unreachable, length 518

192.168.1.13 is the Snom M9 & 192.168.1.80 is the PBX

Your suggestion of a smart switch is indeed a possibility, and I have relocated the Snom base station so that there is only one four port unmanaged network switch between the Snom and the PBX. Unfortunately, without any improvement.

sngrep produces some interesting infomation:

                                                        β”‚SUBSCRIBE sip:[email protected] SIP/2.0
        192.168.1.13:5060             192.168.1.80:5060 β”‚Via: SIP/2.0/UDP 192.168.1.13:5060;branch=z9hG4bK-5uyyi9;
      ──────────┬─────────          ──────────┬─────────│rport

08:45:15.657348 β”‚ SUBSCRIBE β”‚ β”‚From: β€œ100” sip:[email protected];tag=8esrwu
+4.009820 β”‚ ──────────────────────────> β”‚ β”‚To: β€œ100” sip:[email protected]
08:45:19.667168 β”‚ SUBSCRIBE β”‚ β”‚Call-ID: 2ml0boqy@snom
+4.009762 β”‚ ────────────────────────>>> β”‚ β”‚CSeq: 1523183243 SUBSCRIBE
08:45:23.676930 β”‚ SUBSCRIBE β”‚ β”‚Max-Forwards: 70
β”‚ ────────────────────────>>> β”‚ β”‚Contact: <sip:[email protected]:5060;transport=udp;line=m2
β”‚ β”‚ β”‚shyf>;reg-id=1;+sip.instance=β€œ<urn:uuid:507ed808-76f9-42b
β”‚ β”‚ β”‚3-9bbf-0271da7507c4>”
β”‚ β”‚ β”‚Supported: outbound, gruu
β”‚ β”‚ β”‚Event: message-summary
β”‚ β”‚ β”‚Accept: application/simple-message-summary
β”‚ β”‚ β”‚User-Agent: snom-m9/9.1.56
β”‚ β”‚ β”‚Expires: 60
β”‚ β”‚ β”‚Content-Length: 0

Looks as though the registration requests are coming in, but Asterisk is not replying.

Regards

John

FreePBX Firewall (or whatever other software firewall you may be running) is blocking the requests.

Thanks Stewart,
I completely reinstalled Debian / FreePBX using the wiki guide, and ran into exactly the same problem again, however, once I killed off the default firewall in Debian (nftables) it all started working as it should.

Many thanks for your help with this.

Regards

john

Update:
Turned on the FreePBX Firewall, immediately lost all extensions (503 Service unavailable), and turning it off has not allowed them to reconnect.
Any ideas?

Sorry, I’m puzzled. Perhaps fail2ban is still running, or iptables and/or nftables running other rules. Two reboots within 5 minutes should kill FreePBX Firewall. Is this a VM?

When you have the trouble, if you still have SSH or console access, check what rules are active.