FreePBX - Raspberry Pi - Twilio Trunk - Intermittent Error Communicating

I have a Raspberry Pi 3 running FreePBX using a Twilio trunk. Everything works great 99% of the time but once and a while I get the following error from Twillio and after testing I have been able to reproduce it at times.

Warning - 32011
Error communicating with your SIP communications infrastructure

I force the region and like I said 99% get through. I replaced phone and IP below as to not get spammed but in the configuration they are filled out properly.

Request timeout with sip:[email protected];region=us1

Any ideas what I can try?

Thank you in advance.

Perhaps watch sngrep’s output? It will isolate your SIP traffic by connection and if you have a network problem , identify it.

Thank you so much for pointing this tool out to me. I wish I had this when I was setting things up. I think I would have saved days of my life! LOL.

Now I am off to watch the logs - thank you once again and I will reply back with my findings.

Am I supposed to see the Polycom VOIP phone doing a SUBSCRIBE every second? Its filling up the screen so quickly.

No, you need to fix that in however you are setting up the phone, but generally just an annoyance not a deal killer, but true, your raspberry is often considered underpowered for more than a couple iof phones

Ok so I was able to see things a little more clearly now - very strange - i get all the COMPLETED calls when testing but when I get a failure I don’t get anything in sngrep. Nothing out of the normal or something that would show me a failure.

Any ideas?

sngrep is ahead of any software firewall on your PBX, so assuming that Twilio’s ‘Request timeout’ log and your sngrep log are both accurate, the incoming INVITE was likely blocked by your router or hardware firewall.

If your SIP port is open to only specific IP addresses, confirm that you have whitelisted all those that Twilio requires.

If you are not forwarding the SIP port at all (but depending on qualify to keep it open), your router/firewall will likely not pass the INVITE if it comes from a different IP address.

If you have a way to capture traffic on the WAN interface of your router, see whether the INVITE from Twilio is present for failing calls.

If the router does not have a public IP address on its WAN interface (connected through ISP-supplied gateway, ISP does NAT, etc.), please provide details.

If the Pi is connected to your network via Wi-Fi, there are several possible failure modes; please provide details.

1 Like

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