[SR-Users] upgrade V4.2.5 to V3.1 -Build error

ycaner yasin.caner at netgsm.com.tr
Thu Aug 13 10:59:54 CEST 2015


i found a changes for rever_uri() function . i am using carrierroute module
to route changes. so after a query destination number , a prefix is added to
Request uri and sends  request. after get error first request goes to
failure route and works revert_uri() . revert_uri changes to first request
uri. There is a example above.

Client sends                                                                                
: 5055066105
Servers addes prefix                                                                    
: 200025055066105 
after t_relay if i get error goes to failure_route[3] and work revert uri :
5055066105

in kamailio V4.2.5 it gives "200025055066105"

  ALERT: <script>: Request Uri -0 05055066105
  ALERT: <script>: Request Uri -1 Before revert 200025055066105
  ALERT: <script>: Request Uri -2 After revert 05055066105

----- Sample Code ----------------

[switchingroute]{

//$avp(69 is prefix 2002

$rU=$_s($avp(69)$rU);

if(!cr_route("$avp(s:carrier)","$avp(s:domian)","$rU","$rU","call_id","$avp(s:route_desc)"))
         {
                     send_reply("603", "Route bulunamadi");
                     exit;
         }

         $avp(s:host)= $rd+":"+$rp;
         t_on_failure("3");

        if(!t_relay()) {
                 xlog("L_ERR","Servis Disi");
                 send_reply("408", "Servis Disi");
        }else{
                 exit;
        }
        return;


}


failure_route[3]{


        xlog("L_ALERT","Request Uri -1 Before revert $rU");
        revert_uri();
       
if(!cr_next_domain("$avp(s:carrier)","$avp(s:domian)","$rU","$avp(s:host)","$T_reply_code","$avp(s:domain)")){
                xlog("L_ALERT","[$ci]route:bulunamadi");
                exit;
        }
       
if(!cr_route("$avp(s:carrier)","$avp(s:domian)","$rU","$rU","call_id","$avp(s:route_desc)")){
                xlog("L_ALERT","[$ci]route:yapilamadi");
                exit;
        }
        $rU=$_s($avp(69)$rU);
        xlog("L_ALERT","Request Uri -2 after rever $rU ");

        $avp(maliyet_id)=$avp(s:route_desc);
        $avp(s:host)= $rd;
        t_on_failure("3");

        if(!t_relay()) {
                 send_reply("408", "Servis Disi");
                 exit;
        }else{
                 exit;
        }

        return;
}




--
View this message in context: http://sip-router.1086192.n5.nabble.com/upgrade-V4-2-5-to-V3-1-Build-error-tp140428p140431.html
Sent from the Users mailing list archive at Nabble.com.



More information about the sr-users mailing list