INVITES Seen in SNGREP but Not in Asterisk CLI with NO Firewall

FreePBX 16.0.26 The firewall is off, iptables and fail2ban turned off with systectl, se linux disabled. I see INVITEs from my ISP in sngrep, but no response from asterisk. No evidence of inbound in CLI with verbosity 30 and SIP debug on. It looks just like ISP blocked by a firewall, but there is none. On the 5th or 6th dial, the call comes through.

Legacy SIP credential trunk with only 1 registration confirmed by ISP.

Any ideas greatly appreciated.

sngrep sees kernel traffic, asterisk sees traffic filtered by any firewall rules

OP claims there is no such firewall enabled.

Correct, FreePBX firewall, iptables and fail2ban all disabled. What else could be filtering?

I assume that you mean it’s a chan_sip trunk. Is this a system that had been working and is now failing? If so, do you have any idea what may have changed (new ISP, new modem/router, software update, etc.)? If this is a new system, why did you even think about using chan_sip? If it’s because you had trouble with pjsip, please explain.

Most likely, the INVITE is sent to a port other than what Bind Port is set to.
Or, the INVITE is corrupted, most likely by a SIP ALG.
Or, there is a competing registration, such as a pjsip trunk.

If you still have trouble, post the complete INVITE as shown by sngrep.

Thanks, Stewart. This system has had the same ISP since it was FreePBX13. (Which is why it is also chan_sip instead of pjsip – never got around to upgrading. ) I could upload a whole sip trace that shows 6 INVITEs to port 5060 (correct) with no response from asterisk, then a 7th exactly the same that connects the call, however per company policy for this client I would have to sanitize most of the file – PIA and not much to see. There was no output at all in asterisk CLI output at all for the first 6 invites seen in sngrep.

So, what could prevent asterisk from seeing the INVITES the kernel saw?

BTW: Asterisk 18

Can you share a screenshot of your PJSIP settings under Settings → Asterisk SIP settings → chan_pjsip?

PJSIP is disabled via Advanced Settings on this server. Here is the SIP config. The ISP is and their docs require that nothing but registration is on “Inbound” Tab.


Register: 123456:[email protected]:5060

Sorry, should have asked for chan_sip screenshot instead of pjsip. Missed where you said that it’s a legacy SIP trunk.

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