0

I have an Asterisk server (15.5, FreePBX) with three SIP trunks from different providers configured, two of them are working fine while the third for every call keep sendind the invite despite the correct answer from the trunk.

The trunk was working well until we had some NAT problem with a change of configuration in the firewall, but I solved this issue and now I can see that the server connects to the trunk with the right ip and I can also see the answers coming to the right interface, whit sngrep this is what a call looks like:

sngrep dump of call

After the invite the trunk reply with 100, but then the server resends the invite and never responds to trunk's messages. The call is correctly placed (and billed) by the provider but we are unable to talk as RTP channel is never opened. What could be the reason for this behavior?

Spuria
  • 11
  • 3
  • A combination of NAT and SIP is the very popular and reliable way to shoot yourself in the foot. So, which changes to the NAT you did, or better, *how exactly* it is configured now? This is very important information and it must present in the question. Also, try to capture and analyze traffic, `tcpdump` and `wireshark` are your best friends when debugging a telephony. – Nikita Kipriyanov Aug 19 '21 at 11:01
  • Hi, I discovered this absolute truth :) I have a pfsense firewall, the internal ip is configured to use the gateway that has the public subnet assigned, there is an outgoing NAT rule that translates the internal ip with the public ip and some inbound NAT for specific ports on the wan interface, including the sip port. If i try e.g. curl https://ifconfig.me the answer is correct – Spuria Aug 19 '21 at 12:18
  • I'm planning to change the configuration, but can't right now – Spuria Aug 19 '21 at 12:20
  • You need to DNAT not only the SIP port, but also a range of RTP ports configured in Asterisk (see common SIP settings, usually 10000-20000). And, I suspect you have a SIP ALG enabled on the NAT box, which could easily confuse things; better don't use that. – Nikita Kipriyanov Aug 19 '21 at 12:45
  • yep, 10000-20000 are forwarded too, I looked for SIP ALG and it seems that pfsense does not have it – Spuria Aug 19 '21 at 14:06
  • also, here the problem is before the RTP connection, as my asterisk does never send an ACK to the 100 response – Spuria Aug 19 '21 at 14:06
  • Then it seems you have to read "full" log. – Nikita Kipriyanov Aug 20 '21 at 05:14

0 Answers0