[SR-Users] re.subst does not work with $var?
Pranathi Venkatayogi
pvenkatayogi at cyracom.com
Mon Jun 19 17:59:04 CEST 2017
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 at 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<http://www.cyracom.com/>
Join us: [cid:image001.gif at 01D1C9C9.C4E8B6D0] <https://www.facebook.com/pages/CyraCom-LLC/134704783312720> [cid:image002.gif at 01D1C9C9.C4E8B6D0] <https://twitter.com/cyracom> [cid:image003.gif at 01D1C9C9.C4E8B6D0] <http://www.linkedin.com/company/cyracom> [cid:image004.gif at 01D1C9C9.C4E8B6D0] <http://www.cyracom.com/blog/>
[cid:image005.png at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170619/633f6ff7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 405 bytes
Desc: image006.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170619/633f6ff7/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 458 bytes
Desc: image007.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170619/633f6ff7/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 607 bytes
Desc: image008.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170619/633f6ff7/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.png
Type: image/png
Size: 516 bytes
Desc: image009.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170619/633f6ff7/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image010.png
Type: image/png
Size: 14140 bytes
Desc: image010.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170619/633f6ff7/attachment-0004.png>
More information about the sr-users
mailing list