<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>there is an alternative where you can use a combination of xavps
and corex module function via_use_xavp_fields() -- see:</p>
<p>Â * <a
href="https://www.kamailio.org/wiki/cookbooks/5.3.x/core#xavp_via_fields">https://www.kamailio.org/wiki/cookbooks/5.3.x/core#xavp_via_fields</a></p>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I think I looked at some point at
set_advertised_address() from core to make it accept variables,
but its current form does some pre-compilation at startup, keeping
back references that are used at runtime, so it was not an easy
update. But we can add new functions to set those xavps and the
internal flag, if people find it simpler. The old function can
stay for those that want to work with static values for a bit of
more speed.<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Cheers,<br>
Daniel</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 22.03.20 14:07, Sergiu Pojoga wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJZsGCko4t7CURqmJWpZyAsRYViK_tUHH3KW4H0iK1q952es_w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi there,<br>
<div><br>
</div>
<div>The function doesn't appear to accept vars.<br>
</div>
<div><br>
</div>
<div>For example, set_advertised_address("$var(someaddress)")
results in a VIA of string $var(someaddress), instead of var's
value.</div>
<div><br>
</div>
<div><a
href="https://www.kamailio.org/wiki/cookbooks/5.3.x/core#set_advertised_address"
moz-do-not-send="true">https://www.kamailio.org/wiki/cookbooks/5.3.x/core#set_advertised_address</a><br>
</div>
<div><br>
</div>
<div>kamailio 5.3.2 (x86_64/linux) 0bed10<br>
</div>
<div><br>
</div>
<div>Cheers.</div>
<div>--Sergiu</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<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></pre>
</body>
</html>