[OpenSIPS-Users] Strip + character

Adam Twardowski adam.twardowski at gmail.com
Mon Aug 16 15:56:07 CEST 2010


I've never used strip() before, but you could try $rU=$(rU{s.substr,1,0})

you could also do something similar in your if() statement if you want to
get rid of the regular expression and save a couple cpu cycles.

On Mon, Aug 16, 2010 at 9:45 AM, michel freiha <michofr at gmail.com> wrote:

> Dear All,
>
> I'm trying to strip + from dialed number that hit the OpenSIPS server,
> after that I'm using carrierroute that read from database all routes and
> send the call to the appropriate GW...The issue that the number is sent with
> the + to the destination GW so i need you to help me please...
>
> The DialPlan is as below:
>
> if($rU =~ "^[+].*" )
> {
>         strip(1);
>     if(!cr_route("default", "0", "$rU", "$rU", "call_id")){
>
>        sl_send_reply("403", "Not allowed");
>      } else {
>          t_on_failure("1");
>           # Relay the request to the gateway
>            t_relay();
>
>    }
>
>
> Regards
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100816/45e83172/attachment.htm 


More information about the Users mailing list