I understand, thank you.
I will try.

-----Original Message-----
From: users-boun...@lists.opensips.org
[mailto:users-boun...@lists.opensips.org] On Behalf Of Trevor Steyn
Sent: Thursday, July 23, 2015 12:46 PM
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] changing $rU number

Documentation can be found here

http://www.opensips.org/html/docs/modules/1.10.x/dialplan.html

For egsample to remove all "-" characters in $rU do the following

Add the following into the dialplan table

mysql> select * from dialplan\G;
*************************** 1. row ***************************
         id: 6
       dpid: 1
         pr: 98
   match_op: 0
  match_exp: -
match_flags: 0
  subst_exp:
   repl_exp:
    timerec:
   disabled: 0
      attrs:
*************************** 2. row ***************************


Then call dp_translate("1","$rU/$rU"); in your script.

Regards
Trevor Steyn


On 23/07/2015 10:51, dpa wrote:
>
> And how dialplan helps me to do it, if ,for example, one time I have 
> such characters 8%2089-0987-09, and in another time I have 987-89%20908-1?
>
>  
>
> *From:*users-boun...@lists.opensips.org
> [mailto:users-boun...@lists.opensips.org] *On Behalf Of *Trevor Steyn
> *Sent:* Thursday, July 23, 2015 11:27 AM
> *To:* users@lists.opensips.org
> *Subject:* Re: [OpenSIPS-Users] changing $rU number
>
>  
>
> Hi Denis
>
> You can use the dialplan module to rewrite variables as below
>
> dp_translate("1","$rU/$rU");
>
> Then insert you regexp into the dialplan tables, read the dialplan 
> module documentation for more info.
>
> Regards
> Trevor
>
> On 23/07/2015 09:49, dpa wrote:
>
>     Thank you.
>
>     But what can I use for do it?
>
>      
>
>     *From:*users-boun...@lists.opensips.org
>     <mailto:users-boun...@lists.opensips.org>
>     [mailto:users-boun...@lists.opensips.org] *On Behalf Of *Schneur
>     Rosenberg
>     *Sent:* Thursday, July 23, 2015 10:40 AM
>     *To:* OpenSIPS users mailling list
>     *Subject:* Re: [OpenSIPS-Users] changing $rU number
>
>      
>
>     $rU is read/write so you can use regexp and just rewrite the 
> variable
>
>      
>
>     On Thu, Jul 23, 2015 at 10:33 AM, dpa <denis7...@mail.ru
>     <mailto:denis7...@mail.ru>> wrote:
>
>     Hello!
>
>      
>
>     Opensips 1.10.
>
>      
>
>     I am using DROUTING module from making routing.
>
>     But some SIP UA sends to Opensips tel. number with  some
>     unnecessary characters, such as "%20" and "-".
>
>      
>
>     The question is how can I delete these characters from request user?
>
>      
>
>     Thank you for any help.
>
>      
>
>      
>
>      
>
>
>     _______________________________________________
>     Users mailing list
>     Users@lists.opensips.org <mailto:Users@lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>      
>
>
>
>
>     _______________________________________________
>
>     Users mailing list
>
>     Users@lists.opensips.org <mailto:Users@lists.opensips.org>
>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  
>
>
>
> _______________________________________________
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to