Any input please? How do I use these methods with $var…

 

I get the same behavior when I use avp_subst as well.

 

From: Pranathi Venkatayogi
Sent: Thursday, June 15, 2017 6:22 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: re.subst does not work with $var?

 

I am trying to replace “domain1” with “domain2” in the msrp(body).

 

Following stmt works where in I specify domain strings as literals.

var(modBody) = $(msrp(body){re.subst,/()(domain1)()/domain2/g});

 

I am having trouble making the same work with $var variables.

See below – this code does not do the replacement –

 

$var(domain1) = “()(domain1)()”;

$var(domain2) = “domain2”;

var(modBody2) = $(msrp(body){re.subst,/$var(domain1)/$var(domain2)/g});

 

Any clue/ideas or is it by design?

 

Thanks,

Pranathi Venkatayogi

System Developer II

(520) 745-9447 x4466

www.cyracom.com

 

Join us:   cid:image001.gif@01D1C9C9.C4E8B6D0 cid:image002.gif@01D1C9C9.C4E8B6D0 cid:image003.gif@01D1C9C9.C4E8B6D0 cid:image004.gif@01D1C9C9.C4E8B6D0

 

cid:image005.png@01D1C9C9.C4E8B6D0

 

DISCLAIMER: This e-mail and any attached content may contain confidential or privileged material delivered for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender immediately by reply e-mail and delete all copies of this message. It is the recipient's responsibility to scan this e-mail and any attachments for viruses. The content of this e-mail message, including any attachments, does not comprise a contract or a portion of a contract, and so does not bind CyraCom International, Inc. or any of its agents or subsidiaries. CyraCom, LLC and Voiance Language Services, LLC are wholly owned subsidiaries of CyraCom International, Inc.