[OpenSIPS-Users] NAT handling for internally generated messages in local_route

Rodrigo Pimenta Carvalho pimenta at inatel.br
Fri Feb 5 19:49:42 CET 2016


In my configuration I have something like this:


#### USeR LOCation module
loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "db_mode",   1)
modparam("usrloc", "db_url", "sqlite:///usr/local/opensips/db/sisc.sqlite") # CUSTOMIZE ME




route{


        force_rport();
        if (nat_uac_test("23")) {
                if (is_method("REGISTER")) {
                        fix_nated_register();
                        setbflag(NAT);
                } else {
                        fix_nated_contact();
                        setflag(NAT);
                }
        }



.

.

.


onreply_route[handle_nat] {
        if (nat_uac_test("1"))
                fix_nated_contact();
        #if ( isflagset(NAT) )
                #rtpproxy_answer("ro");
        xlog("incoming reply\n");
}



Hopefully it can give you a direction to follow.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


________________________________
De: users-bounces at lists.opensips.org <users-bounces at lists.opensips.org> em nome de Husnain Taseer <husnain.taseer at gmail.com>
Enviado: sexta-feira, 5 de fevereiro de 2016 15:06
Para: users at lists.opensips.org
Assunto: [OpenSIPS-Users] NAT handling for internally generated messages in local_route

Dear Users,
I am facing the same issue as discussed in the below thread few years ago.

http://opensips.org/pipermail/users/2009-March/003648.html

I am setting $DLG_timeout for every call so after this amount of seconds BYE is generated by TM module and sent to both caller and callee. But if callee or caller are behind NAT then the contact IP address (in their respective contact fields in dialog table) is private because of which opensips is sending BYE to their private addresses which is not reaching them and call don't disconnects. Is there any solution available to handle this issue.

Regards,
Husnain Taseer
VoIP Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160205/a90a94f6/attachment-0001.htm>


More information about the Users mailing list