[OpenSIPS-Users] Problem in handling BYE using topology_hiding_match()

Ravindrakumar Bhatt ravindra.bhatt at ecosmob.com
Tue Oct 17 05:29:16 EDT 2017


Hello,
i am using opensips v2.2.1 as SBC.
call flow is like caller->opensips->server->opensips->callie.call is
established successfully but when BYE is sent by any user it is not
recognised by topology_hiding_match() also i am not getting any dialog
related values(DLG_status,DLG_did etc) in ACK or BYE method.

here is my logic for  requset handling :

route[PROCESS_INVITE] {

        route("SETCDR");
        if(t_check_trans()) {
                drop();
        }
        route("CHECK_NAT");
        create_dialog();
        do_accounting("aaa","cdr|failed");
        route("REALY_ROUTE");
        exit;
}

route[RELAY_ROUTE] {
        if(is_method("INVITE|UPDATE")) {
        xlog("L_INFO","CI:$ci In Relay Route RU:$ru DU:$du Tu:$tu TU:$tU
CT:$ct\n");
                if(!has_totag() && is_method("INVITE") && !isflagset(15)) {
                        xlog("L_INFO","CI:$ci Topology_Hiding Call\n");
                        setflag(15);
                        topology_hiding("UC");
#                       record_route();


                }
                if($avp(use-rtpproxy)=="YES") {
                        route(PROCESS_RTPPROXY_OFFER);
                }
                xlog("L_INFO","CI:$ci Routing Call IP:$avp(dest-ip)
PORT:$avp(dest-port)\n");

                $avp(call_status)="Failed";
                t_on_branch("DEFAULT_BRANCH_ROUTE");
                t_on_reply("DEFAULT_REPLY_ROUTE");
        }

                xlog("L_INFO","DAILOG STATUS::::  $DLG_end_reason
$DLG_did      $DLG_status $DLG_count\n");

#       record_route();
        if (!t_relay()) {
                sl_reply_error();
        }
        exit;
}

route[MATCH_DIALOG] {

        xlog("L_INFO",":::::DAILOG STATUS:::: $rm: $DLG_end_reason
$DLG_did     $DLG_status $DLG_count\n"); #HERE I AM GETTING most values
null
        if(has_totag() &&
is_method("INVITE|ACK|BYE|UPDATE|REFER|PRACK|INFO") ) {
                xlog("L_INFO","INSIDE MATCH_DIALOG :::: $rm\n");
#               loose_route();
                xlog(" found match request to a dialog \n");
                if(topology_hiding_match()) {                    #THIS
CONDITIONS FAILS FOR ALL REQUESTS
                        if(is_method("BYE")) {
                                rtpproxy_unforce();
                        }
                        route("RELAY_ROUTE");
                }
        }
}

what is going wrong here ? is there any way to handle this issue?

Thanks and  regards ,
Ravindra Bhatt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20171017/1087da65/attachment.html>


More information about the Users mailing list