[OpenSIPS-Users] regex extract value from $ru
Satish Patel
satish.txt at gmail.com
Mon Sep 15 03:53:22 CEST 2014
Great!!! Thanks a lot
Sent from my iPhone
On Sep 14, 2014, at 4:41 AM, Liviu Chircu <liviu at opensips.org> wrote:
> 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
>>
>> sip:123456789 at sipprovider.com:5060
>>
>> to
>>
>> sip: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
>
> _______________________________________________
> 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/3c29ac99/attachment.htm>
More information about the Users
mailing list