I’m about at my wit’s end with this one. FreePBX, with a SIP Station trial currently, and everything seems to be registered fine, firewall tests say they’re passing, and I can successfully make outbound calls just fine. However, when I dial my DID at sipstation from an external phone, it acts like it’s trying to connect for a while, then the cell phone says the call failed. There’s no ringing tone at all, and no sign at all in the FreePBX logs or debugging info that the inbound call ever got to FreePBX. What’s my next step for debugging this?
Since firewall details may be related, the PBX is behind a SonicWall that is allowing ports 10000-20000 from anywhere, and 5060, 5061, and 5160 from the SIPStation trunk URLs trunk1. freepbx. com, trunk2. freepbx. com, trunktrial1. freepbx. com, trunktrial1. freepbx. com. Outbound those ports are open as well.
As far as call routing, I have a couple of extensions (102 and 103) set up and logged in (103 from my desktop with linphone, and 102 from an iOS phone with linphone app, either on the network or off network and on a VPN) and an inbound route set up to route from our DID to ext 103, and right now, I have an inbound route for anything inbound to go to ext 103 and it still doesn’t work or see any inbound call activity in the logs when I place a call.
Using registration or IP authentication? If registration, does Asterisk show the trunk as registered? If not, fix that first. If IP auth, confirm that your correct public IP is configured at the SIPStation portal.
Run sngrep and see whether the incoming INVITEs appear. If so, it’s a FreePBX firewall issue.
Otherwise, does the SonicWALL have a public IP on its WAN interface? If not, your modem (configured as gateway) or your ISP (doing NAT) could be blocking the traffic.
Otherwise, capture traffic on the WAN interface and see whether the INVITEs are getting there. If yes, SonicWALL configuration issue. If no, open a ticket with SIPStation.
Thanks for the reply! On the SipStation page in Freepbx at /admin/config.php?display=sipstation it is showing both primary and secondary trunks are registered, SIP Ping is okay, and showing the right public IP.
When I start up sngrep and make an incoming call from my cellphone to our DID, which is set up to route to ext 103, on a softphone I have open on my PC (also registered and available, and can receive calls from other extensions on the PBX), I got two entries:
OPTIONS 103@localIP to 103@myPC-IP, source pbx:5060 dest myPC-IP:5060
OPTIONS unknown@someIP:5160 to trunktrial2.freepbx.com, source pbx:5160 dest anotherIP:5060
As I’ve kept sngrep open, some Register messages show up involving the sip trunk, a couple of NOTIFY involving my extension, and more OPTIONS from the same IP.
SonicWall has public IP on the WAN and is routing traffic through, and the configuration is set up to forward the right ports through the NAT, and everything I can see is indicating that it’s set up correctly.
I tried outbound from the softphone to my cell phone, and it shows the INVITEs in sngrep for call setup and call completed. Inbound calls still show no INVITE.
If no inbound INVITE is visible in sngrep, this almost certainly means it’s being blocked by your sonicwall. Are you aware of this thread: Happiness With Sonicwalls - It can happen!
Yes, I really got a lot from that thread. Someone else had set up the access rule, and had set it up so that it was looking for traffic from our SIP trunk hosts to our PBX IP (which is a 192.168 natted internal IP), and with some packet tracing on the sonicwall I saw the invites were getting dropped. The rule needed to match SIP hosts to our public IP, not the internal PBX IP, and once that change was made it started working great. Thanks for your help!