[OpenSIPS-Users] BAD ACK Reply

M. KHaled W. Chehab kchehab at icucall.com
Sat Mar 30 03:09:37 CET 2013


Any idea for the below issue ?

Regards

Sent from my android device.

-----Original Message-----
From: "M.Khaled W Chehab" <kchehab at icucall.com>
To: users at lists.opensips.org
Cc: users-bounces at lists.opensips.org
Sent: Thu, 28 Mar 2013 6:11 PM
Subject: [OpenSIPS-Users] BAD ACK Reply

HI,

 

I  fix the ACK reply  using  the below code for topology hiding scenario and
setting an ACK timeout 

if (is_method("ACK")){

    $avp(timeout2) = 3540;

}

                         if(match_dialog()) {

                                     xlog("L_INFO", "<<<<< in-dialog
topology hiding request - $DLG_dir >>>>> \n");

                                     if (check_route_param("nat=yes")) {

                                                 setflag(5);

                                                 setbflag(6);

                                     }

 

                                     if ( is_method("INVITE")) {

                                                 $avp(timeout2) = 3;

 

                                     } else if (is_method("ACK")) {

                                                 $avp(timeout2) = 3540;

                                     }

 

                                     route(1);

                                     exit;

                         }

            }

route[1] {

            if (subst_uri('/(sip:.*);nat=yes/\1/')) {

                         setbflag(6);

    }

 

    if (isflagset(5)) {

        search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');

    }

 

onreply_route[2] {

        search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');

 

        if (isbflagset(6)) {

                fix_nated_contact();

        };

 

Etc. 

 

            if ($rU=~"^.") {

 

                         if (!do_routing("$avp(Cusid)","FW")) {

                                     send_reply("404","No PSTN Route
found");

 
exit;

                         }

failure_route[1] {

 

if( t_check_status("[4-6][0-9][0-9]")){

                         xlog("L_INFO", "--Debug Customer
ID:$avp(Cusid)/IP:$rd-----$si Reply: $T_reply_code#######13\n");

                         xlog("L_INFO", "##########==========End of invite
ID:$avp(Cusid)/IP:$rd###############\n");

                         

                         if (!t_check_status("487")) {

                                     route(6);

                         }

route[6] {

 

if (is_avp_set("$avp(rule_attrs)"))  {

 

if($avp(rule_attrs)=="1"){

 

xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$si-----Sticky Route\n");

}else{

            if ( use_next_gw() ) {

            $var(prefix) = $(avp(gw_attrs){csv.value,1}); 

            $rU = $var(prefix) + $avp(dst);

            xlog("L_INFO", "--Debug Customer
ID:$avp(Cusid)/IP:$si-----Calling number to Next Provier $rU\n");

                         setflag(26); #Missed calls

                         xlog("L_INFO", "--Debug Customer
ID:$avp(Cusid)/GW-IP:$si-----Trunk Name:$avp(gw_id)\n");

                         t_on_failure("1");

                         t_relay();

                         exit;

            }

 

}

}

 

But what I can see now and as you can check in the capture attached  ,that
opensips IP (5.104.224.33) send the ACK to 1st failed route replying to the
200 OK instead of the second route which sends the 200 ok and the call
connected through .

 

Please advice  

Khaled Chehab

Senior NGN Engineer

Description: icucall

Operations Office - Lebanon

Office    : +961 1 515155 ext 300

Mobile  : +961 3 045212

E-mail    : kchehab at icucall.com

MSN ID :khalidchehab at hotmail.com 

Skype    : k_chehab 

Web Site: http://www.icucall.com

                     http://www.allohi.com

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130330/66e16409/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 5316 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20130330/66e16409/attachment-0001.png>


More information about the Users mailing list