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    : [email protected]

MSN ID :[email protected] 

Skype    : k_chehab 

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

                     http://www.allohi.com

 

<<image001.png>>

Attachment: bad ACK reply.pcap.gz
Description: Binary data

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to