<div dir="ltr"><font face="trebuchet ms,sans-serif">Hello,<br clear="all"></font><div><font class="Apple-style-span" face="&#39;trebuchet ms&#39;, sans-serif"><br></font></div><div><font class="Apple-style-span" face="&#39;trebuchet ms&#39;, sans-serif">We plan to use Kamailio as redirect server. Corresponding contact list is to be fetched by a Lua script from DB. <br>
</font></div><div><br></div><div>The problem is about calling the required &#39;rewriteuri&#39; function:</div><div><ol><li>From lua script. both &#39;sr.rewriteuri()&#39; and &#39;sr.modf(&quot;rewriteuri&quot;, ...)&quot; fails to write the &#39;contact&#39; field.</li>
<li>I tried an alternative way; pushing the value from lua (e.g. sr.pv.sets(&quot;contact&quot;, &quot;sip:...&quot;)) and got the value in the Kamailio.cfg ($var(contact)). But can&#39;t call the rewriteuri function with this variable&#39;s value as argument. This seems to be a general problem of calling a function from .cfg with a variable&#39;s value as parameter.</li>
</ol><div>Any help much appreciated.</div></div><div><br></div><div>-- <br>Sharif <br>
</div></div>