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

Alex Balashov abalashov at evaristesys.com
Fri Jan 8 22:34:28 CET 2016


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/



More information about the sr-users mailing list