[SR-Users] using re.subst with an $avp or $var

Vik Killa vipkilla at gmail.com
Fri Jan 8 22:40:24 CET 2016


That last statement was in-accurate. Im not trying to modify the R-URI at
all actually.
I'd like to create a variable.

On Fri, Jan 8, 2016 at 4:38 PM, Vik Killa <vipkilla at gmail.com> wrote:

> I'm not trying to replace the R-URI like in your example, im trying to
> remove a prefix from the RURI
>
> On Fri, Jan 8, 2016 at 4:34 PM, Alex Balashov <abalashov at evaristesys.com>
> wrote:
>
>> On 01/08/2016 04:28 PM, Vik Killa wrote:
>>
>>              $var(destnumber1) =
>>> $(ru{re.subst,/^sip:$var(PrefixMatch)(.*)@(.*)/\1/});
>>>
>>
>> But, it's certainly worth asking if what you're trying to accomplish here
>> can't be accomplished differently...
>>
>>    $var(destnumber1) = "$rz:" + $var(PrefixMatch) + "@" + $rd + ":" + $rp;
>>
>> Or:
>>
>>   $var(destnumber1) = $_s($rz:$var(PrefixMatch)@$rd:$rp);
>>
>> -- Alex
>>
>>
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>> 303 Perimeter Center North, Suite 300
>> Atlanta, GA 30346
>> United States
>>
>> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160108/b0afdeb8/attachment.html>


More information about the sr-users mailing list