<p></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mshary/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mshary">@mshary</a>: commenting on your statement:</p>
<blockquote>
<p dir="auto">On the python side, my example just shows that whatever we pass as argument (whether $fU or KSR.kx.get_fuser() or "any-string-value"), the module function will accept and take care of it (i.e. fetch the actual string value internally), this is already tested in my lab environment.</p>
</blockquote>
<p dir="auto">The issue is you try to leverage variables specific for kamailio.cfg-language inside another programming language, going via kamailio.cfg fixup-mechanism, which is usually done only at startup to optimize for runtime and many of them allocate memory, which has to be freed every time if used repeatedly.</p>
<p dir="auto">It is also some performance penalty to parse every time the parameter for kamailio.cfg variables, evaluate them, build the evaluated parameter value, use it and the free. Case by case, this could be desired, but it should not be the common approach.</p>
<p dir="auto">Further more, some scripting languages use similar notation with <code class="notranslate">$name</code> for variables, like Ruby, and the functions exported by KEMI must to conflict with them -- like in the next basic example (taken from the internet, not showing a kemi function, but trying to make the point):</p>
<pre class="notranslate"><code class="notranslate">#!/usr/bin/ruby

$ru = 10
class Class1
   def print_global
      puts "Global variable in Class1 is #$ru"
   end
end
</code></pre>
<p dir="auto">Hoping that makes more sense what I tried to explain.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/3247#issuecomment-1263377228">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLPUVXGOLOHVJIO2KLWA24BBANCNFSM6AAAAAAQQ7SOMU">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZPFRSFSL6T5BXZCUMLWA24BBA5CNFSM6AAAAAAQQ7SOMWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSLJWNUY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/pull/3247/c1263377228</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/3247#issuecomment-1263377228",
"url": "https://github.com/kamailio/kamailio/pull/3247#issuecomment-1263377228",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>