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.
Regards
John
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.
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.