<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>if I remember correctly, something similar can be achieved with
dialplan module (might require a modparam for evaluating variables
in match expression).</p>
<p>There is a function to evaluate twice a string with variables,
but it may lead to leak in some cases. I would avoid using it if
not proper testing is done.</p>
<p>Then, I second that KEMI can be a better option for more dynamic
replacement needs.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 28.03.22 16:44, Igor Olhovskiy
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJTkRNsUiYhkzzkqKGG39y=cm-C556iVkF7wutU7NwoHmN2bQg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>David,</div>
<div><br>
</div>
<div>Regexps in Kamailio are precompiled at script load for
performance reasons. Really limited set of regex operations
are dynamic, like <a
href="http://www.kamailio.net/docs/modules/5.4.x/modules/textops.html#textops.f.is_present_hf_re_pv"
moz-do-not-send="true" class="moz-txt-link-freetext">http://www.kamailio.net/docs/modules/5.4.x/modules/textops.html#textops.f.is_present_hf_re_pv</a></div>
<div>I'd recommend to look at KEMI if you need something
dynamic.<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">пн, 28 мар. 2022 г. в 13:04,
David Villasmil <<a
href="mailto:david.villasmil.work@gmail.com"
moz-do-not-send="true" class="moz-txt-link-freetext">david.villasmil.work@gmail.com</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hello guys,
<div><br>
</div>
<div>Is it possible to use apvs on regexps like:</div>
<div><br>
</div>
<div>$avp(myvar)=$(re{uri.user}{re.subst,/^\+$avp(some_var)/$avp(some_var)/});</div>
<div><br>
</div>
<div>doesn't seem possible</div>
<div><br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">
<div>Regards,</div>
<div><br>
</div>
David Villasmil
<div>email: <a
href="mailto:david.villasmil.work@gmail.com"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">david.villasmil.work@gmail.com</a></div>
<div>phone: +34669448337</div>
</div>
</div>
</div>
</div>
</div>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
* <a href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not
reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
* <a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">Best regards,
<div>Igor</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
* <a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
March 28-31, 2022 (Europe Timezone)
* <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</body>
</html>