Need help with Inbound Routes

Hello,
I just started learning about setting up a PBX and how phone systems work. So as part of this, I am setting up a PBX to use. I went and got a DID from Telnyx and I was following their guide to understand the setup process of a Call Trunk(support[.]telnyx[.]com/en/articles/3284736-how-to-configure-a-freepbx-v14-ip-trunk). I’m running into an issue where I can call outbound from my extension but when I try to perform an inbound call I get the message " All circuits are busy, please try your call again later". I’ve gone and tried to look up the issue but every form post I see is dealing with an outbound route, not an inbound route. Any information that could be provided to help proceed is greatly appreciated.

It sounds like you didn’t set up a ‘catch-all’ Inbound Route. Create it by not specifying a DID or a CID and point the route to something that works (an announcement, an extension, etc.)

Ok I will try that. But why is that necessary if I only have a single DID? Wouldn’t it see that Im calling in on the DID and just route through the inbound route that has the specified DID?

Because that way at least it should get through and then will be easier to diagnose what the disconnect between you and your provider is. You might be getting the DID in headers or E164 , 11 digits or 10 digits . . . It is up to YOU to accommodate what THEY are sending.

(If they are signalling on a protocol:port you are not listening on, or they expect IP and you expect registration (or vice-versa) also . . . then that’s another ball of wax, either way, lets just start with baby steps.) Get ready to sngrep . . . .

So I just changed the route to allow from any DID and I am once again hitting all circuits busy on inbound.
(apologies for the delay, got caught up)

How do I best proceed from here?

Fire up sngrep filter for just INVITES and watch it,

identify the actual number the call is being sent to, for some vsp you will need to use this context

------------------------------------        ; from-pstn-toheader                        ;
; The context is designed for providers who send the DID in the TO: SIP header          ; only. The format of this header is:       ;                                           ; To: <sip:[email protected]>         ;                                           ; So the DID must be extracted between the sip: and the @, which this does              ;

SNGrep? Is that something that is included in freepbx install or is that a tool I have to download?

It’s sngrep no caps, i believe it comes with ‘the distro’ if not its in most repos

So I ran sngrep and I placed a call outbound to see what kind of output I should expect. Then I hung up and tried to dial inbound and I got all circuts busy but no output in sngrep. Nothing at all. The only thing I see is the occainal options communication between my phone and the pbx and an Options communicaiton between my WAN:5160 and sip[.]telnyx[.]com. Could it be that I need to allow 5160 from telnyx to my pbx?

sngrep watches the interface on your PBX’ point of ingress, (in other words, before any iptables filter/masquerading or rerouting) if sngrep doesn’t see anything, either you or your VSP are badly routing your call to the IP of your PBX or there is a device in the intervening path between the VSP and the PBX that is blocking/redirecting that call.

Ok. i will start looking to see if its a problem at the firewall

(Just double checking, check any and all firewalls BEFORE the PBX it is pointless to check the FreePBX firewall itself)

I am stupid. The problem wasnt with my firewall at all. The Issue was in my configuration of the number in telnyx’s portal, I had the port set to the wrong value. I had it set to 5060(pj_sip) when all I had to is change it to 5160(chan_sip) and now it routes. Thank you @dicko for sticking through this with me. you have given me some things to start looking into to further my understanding.

1 Like

Interested bystanders question, sngrep does effective DPI so even if the call came in on 5160 (or anything for that matter) sngrep should have caught it.

Do you have an up-stream firewall ‘messing with /massaging/filtering’ anything SIP-like ?

My firewall shouldnt be messing with the traffic becuase the minute I changed the port started working no issue. I looked over my FW and nothing screamed messing with SIP. Also before I went to telnyx to change the port I tried running wireshark to view traffic, and I couldnt see any communication from my PBX to anywhere, IE the PBX talking to the phone, I verified that i could sniff udp. The computer I was sniffing from is on the same network as the phone and the pbx. Any idea why?

No idea, a normal but quiescent PBX will be passing registrations and likely options and other stuff on the interfaces the other endpoints are findable at. sngrep will generally listen on 0.0.0.0 and show them

Ok I see

If the network is switched, it’s possible that the machine you’re on simply isn’t getting the traffic intended for the phone and/or the PBX. If you are running VLANs, this is doubly true since the switch electronics limit the access of the rest of the devices on the network to only those “involved” in the UDP conversation.

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