<p></p>
<p>I am not 100% sure if its a bug or feature request. And, I have already asked this question in mailing list.</p>
<h3>Description</h3>
<p>I was  trying to pass environment variables to Kamailio that are definitely there in the container. Also, I am trying to use the environment variables to specify ports for Kamailio to listen on. I have already tried passing variables through -A option but to no avail.</p>
<h3>Expected behavior</h3>
<p>Please note that these values are known at start time so should work.</p>
<h4>Actual observed behavior</h4>
<p>Errors</p>
<h4>Debugging Data</h4>
<p>I have tried:</p>
<pre><code>#!define TLS_TO_LISTEN tls:TLS_IP:$env(TLS_PORT)
</code></pre>
<p>I have also tried using in EVAPI <code>bind_addr</code> modparam but that throws errors:</p>
<pre><code>#!define EVAPI_LISTEN "0.0.0.0:EVAPI_PORT"
..
modparam("evapi", "bind_addr", EVAPI_LISTEN )  // IP and port to listen on for incoming TCP connections.
</code></pre>
<p>Error:</p>
<pre><code> ERROR: evapi [evapi_mod.c:156]: mod_init(): invalid port: 0
</code></pre>
<h3>Additional Information</h3>
<pre><code>version: kamailio 5.4.2 (x86_64/linux) f8885c
</code></pre>
<ul>
<li><strong>Operating System</strong>:<br>
Docker Container:</li>
</ul>
<pre><code>Linux fe1933ee6208 4.15.0-124-generic #127-Ubuntu SMP Fri Nov 6 10:54:43 UTC 2020 x86_64 GNU/Linux 
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2585">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKQ43ZK4UWTT47FXFTSUY7DHANCNFSM4U3AYWJA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZKLB4XMRNGTGMEVPG3SUY7DHA5CNFSM4U3AYWJKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4LNTDUPA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2585",
"url": "https://github.com/kamailio/kamailio/issues/2585",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>