[OpenSIPS-Users] regex extract value from $ru
Liviu Chircu
liviu at opensips.org
Sun Sep 14 10:41:44 CEST 2014
Hello Satish,
There is no need for regex substitution, since OpenSIPS has lots of
useful variables. [1]
In your case, you could do:
$var(id) = "sip:" + $rd + ":" + $rp;
[1]: http://www.opensips.org/Documentation/Script-CoreVar-1-12
Best regards,
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 12.09.2014 23:48, Satish Patel wrote:
> Following is $ru and i want to extract following
> sip:sipprovider.com:5060 <http://sipprovider.com:5060>
>
> sip:123456789 at sipprovider.com:5060
> <http://sip:123456789@sipprovider.com:5060>
>
> to
>
> sip:sipprovider.com:5060 <http://sipprovider.com:5060>
>
> I am using following regex but its not working, does following make
> sense?
>
> $var(z) = $ru;
> $var(z) = "s/[^:@]*@//";
> xlog("My regex $ru\n");
>
>
>
>
>
>
>
>
>
> _______________________________________________
> 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/20140914/bd160bb1/attachment.htm>
More information about the Users
mailing list