[OpenSIPS-Users] ACK looping behind NAT
Sreeram Narayanan
sreeram.narayanan at skit.ai
Mon Nov 13 11:26:18 UTC 2023
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20231113/a5e08781/attachment-0001.html>
More information about the Users
mailing list