[SR-Users] Adding two time prefix to $rU

Yebe diomande Keffa keffa at alcall.net
Tue Mar 28 19:50:14 CEST 2017


Hello

 

I am new with kamailio, and trying to add prefix to Request URI ($rU).

I use branch_route,  for $rU=”prefix”+$rU, i got two time prefix adding  =>   prefix_prefix_original$rU

This is my code small code:

request_route {

                if (is_method("INVITE")) {

                               $var(ip1)="51.254.245.58";

                               $var(port1)="33";

                               if(!t_is_set("branch_route")) route(FWD);

                               xlog("L_ALERT","Route FWD is executed from ip:$si to ip:$rd \n");

                }

                exit;

}

 

route[FWD] {

                t_on_branch("CHECK");

                t_relay();

}

                               

 

branch_route[CHECK] {

                $rd=$var(ip1);

                $rU=$var(port1)+$rU;

                xlog("L_ALERT","dst rewrited: $rU \n");

}

 

LOG FILES :

 

Mar 28 19:34:45 ns3033789 systemd[1]: Started LSB: Start the Kamailio SIP proxy server.

Mar 28 19:34:54 ns3033789 /usr/sbin/kamailio[2859]: ALERT: <script>: dst rewrited: 3322508983432

Mar 28 19:34:54 ns3033789 /usr/sbin/kamailio[2859]: ALERT: <script>: Route FWD is executed from ip:51.254.245.57 to ip:5.135.177.203

Mar 28 19:34:54 ns3033789 /usr/sbin/kamailio[2859]: ALERT: <script>: dst rewrited: 333322508983432

Mar 28 19:34:54 ns3033789 /usr/sbin/kamailio[2859]: ALERT: <script>: Route FWD is executed from ip:5.135.177.203 to ip:51.254.245.58

Mar 28 19:35:01 ns3033789 CRON[2915]: (root) CMD (/usr/local/rtm/bin/rtm 8 > /dev/null 2> /dev/null)

^C

root at ns3033789:~# 

 

 

May someone advise me

 

Thank you in advance

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170328/2af6239b/attachment.html>


More information about the sr-users mailing list