[SR-Users] Issue with ACK behind NAT

Alberto Sagredo alberto.sagredo at avanzada7.com
Tue Jul 28 12:22:29 CEST 2015


I have Kamailio in a local network with RTPPROXY and NAT MANAGE

I have seen an issue with ACK as show when Asterisk sends ACK to Kamailio,
it sends to advertised Address instead to Kamailio IP address.

What could i add to solve this?

route[WITHINDLG] {

        if (has_totag()) {

                # sequential request withing a dialog should

                # take the path determined by record-routing

                if (loose_route()) {

                        if (is_method("BYE")) {

                                setflag(FLT_ACC); # do accounting ...

                                setflag(FLT_ACCFAILED); # ... even if the
transaction fails

                                dlg_manage();

                        }

                        if ( is_method("ACK") ) {

                                # ACK is forwarded statelessy

                                route(NATMANAGE);

                        }

                        route(RELAY);

                } else {

                        if (is_method("SUBSCRIBE") && uri == myself) {

                                # in-dialog subscribe requests

                                route(PRESENCE);

                                exit;

                        }

                        if ( is_method("ACK") ) {

                                if ( t_check_trans() ) {

                                        # no loose-route, but stateful ACK;

                                        # must be an ACK after a 487

                                        # or e.g. 404 from upstream server

                                        t_relay();

                                        exit;

                                } else {

                                        # ACK without matching transaction
... ignore and discard

                                        exit;

                                }

                        }

                        sl_send_reply("404","Not here");

                }

                exit;

        }

}

BR
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150728/c04e3ec3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Captura de pantalla 2015-07-28 a las 12.19.28.png
Type: image/png
Size: 64537 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150728/c04e3ec3/attachment.png>


More information about the sr-users mailing list