[OpenSIPS-Users] ACK looping behind NAT

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Nov 23 16:52:08 UTC 2023


Hi Sreeram,

Unfortunately the ladder diagram is not enough as I cannot set the 
details of all the messages :(. The it looks, the 200 OK coming from 
110.46.1.106:5060 may contain bogus routing information (the dialog 
route set), like a wrong Contact hdr point to that EXTERNAL_IP....

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com

On 11/21/23 12:13 PM, Sreeram Narayanan wrote:
> Hi,
> Thanks for your response.
>
> I've added the network trace here <https://pastebin.com/raw/Lxi0SRZ4>. 
> I've masked some of the IPs for security.
> This <https://pastebin.com/raw/rCLdemG4> is what the ACK looks like 
> from the OpenSIPs server. Please let me know if I need to share more 
> information.
>
> On Wed, Nov 15, 2023 at 5:05 PM Bogdan-Andrei Iancu 
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
>     Hi,
>
>     Ideally you should provide a network capture (pcap) from the
>     OpenSIPS server, covering both incoming and outgoing traffic -
>     this is the only way to understand what is wrong with the call.
>
>     As attachments are limited to 40K here, consider using some
>     pastebin or other file sharing service.
>
>     Regards,
>
>     Bogdan-Andrei Iancu
>
>     OpenSIPS Founder and Developer
>        https://www.opensips-solutions.com  <https://www.opensips-solutions.com>
>        https://www.siphub.com  <https://www.siphub.com>
>
>     On 11/13/23 1:26 PM, Sreeram Narayanan via Users wrote:
>>     Hello,
>>
>>     I am trying to use OpenSIPs with the load_balancer module to
>>     balance inbound calls between 2 Asterisk servers. The setup sits
>>     behind a NAT. The OpenSIPs server has a public IP and a private
>>     IP. When an INVITE arrives, it can forward it to one of the
>>     Asterisk servers and Asterisk responds with a 200 OK. The problem
>>     starts when I receive the ACK (from Twilio). The ACK starts
>>     bouncing between the public IP and Private IP of the OpenSIPs
>>     server. It doesn't reach the Asterisk server and eventually times
>>     out. I hope someone can help me with this. Thanks in advance.
>>
>>     Here is my configuration:
>>
>>         ####### Routing Logic ########
>>         route {
>>
>>             if (is_method("INVITE")) {
>>                 rtpproxy_engage();
>>             }
>>
>>             if ($rm=="INVITE") {
>>
>>                 lb_start_or_next(1,"pstn");
>>             }
>>
>>             t_check_trans();
>>             record_route();
>>
>>             t_on_failure("GW_FAILOVER");
>>
>>             # route the request
>>             if (!t_relay()) {
>>                 sl_reply_error();
>>             }
>>
>>             exit;
>>         }
>>
>>         route[RELAY] {
>>             if (!t_relay()) {
>>                 sl_reply_error();
>>             }
>>             exit;
>>         }
>>
>>         failure_route[GW_FAILOVER] {
>>             if (t_was_cancelled()) {
>>                 exit;
>>             }
>>             # failure detection with redirect to next available trunk
>>             if (t_check_status("(408)|([56][0-9][0-9])")) {
>>                 xlog("Failed trunk $rd/$du detected \n");
>>             }
>>         }
>>
>>
>>     -- 
>>     - Sreeram
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.opensips.org  <mailto:Users at lists.opensips.org>
>>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users  <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>
>
>
> -- 
> - Sreeram

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20231123/752d9a7b/attachment.html>


More information about the Users mailing list