[OpenSIPS-Users] ACK and NAT problem

Nawfel Oujdi noujdi at egtelecom.es
Wed Nov 24 13:33:03 CET 2010


Hi!!

 I load balancing  between 2 asterisk,the load_balancer it s done correctly
but the calls hangs up after 10 second approximately. My setup is (just with
1 asterisk):

  Cisco GW ----(NAT)----> Opensips --------> Asterisk

My problem is that opensips never receive the ACK from Cisco GW even if this
last one sent it.

CISCO logs:
ACK sip:911126667@*public ip of asterisk* :5060 SIP/2.0
Route: <sip:*internal ip of opensips*
;lr=on;ftag=F40B44FC-18A6;did=1cd.369d0f26>

I think cisco reply ACK to Asterisk through the internal ip of opensips
cause opensips did not provide Cisco with his public IP (NAT).

Can somebody help me with this??

I heard about    fix_nated_contact() but i don't  know how and where in my
script¿Somebody send me examples ?


Thank you very much!!

my opensips.cfg:
route{

        if (!mf_process_maxfwd_header("10")) {
                sl_send_reply("483","looping");
                exit;
        }
        if ($rU==NULL) {
            # request with no Username in RURI
               sl_send_reply("484","Address Incomplete");
               exit;
        }
        if (!has_totag()) {
                # initial request
                record_route();
        } else {
                # sequential request -> obey Route indication
                loose_route();
                t_relay();
                exit;
        }

        if ( is_method("CANCEL") ) {
                if ( t_check_trans() )
                        t_relay();
                exit;
        }


        # from now on we have only the initial requests
        if (!is_method("INVITE")) {
                send_reply("405","Method Not Allowed");
                exit;
        }

        # detect resources and do balancing
        if (method=="INVITE") {
              load_balance("1","calls");
        }

        # LB function returns negative if no suitable destination (for
requested resources) is found,
        # or if all destinations are full
        if ($retcode<0) {
             sl_send_reply("500","Service full");
             exit;
        }

        xlog("Selected destination is: $du\n");

        # send it out
        if (!t_relay()) {
                sl_reply_error();
        }
}







------------------------------

Aviso legal: Este mensaje electrónico está dirigido únicamente a la(s)
dirección(es) indicadas anteriormente; el carácter confidencial, personal e
intransferible del mismo está protegido legalmente. Cualquier revelación,
uso o reenvío no autorizado, completo o en parte, está prohibido. Si ha
recibido este mensaje por equivocación, notifíquelo inmediatamente a la
persona que lo ha enviado y borre el mensaje original junto con sus ficheros
anexos sin leerlo ni grabarlo, total o parcialmente.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20101124/892ee67e/attachment.htm>


More information about the Users mailing list