[SR-Users] how to use environment variables to set listen address

Daniel Donoghue daniel.donoghue at freespee.com
Sun Dec 13 15:39:32 CET 2020


You can pass in TLS_PORT and TLS_IP as defines using kamailio startup option -A TLS_IP=xxx -A TLS_PORT=xxxx but to my knowledge you can’t otherwise dynamically bind to IPs/Ports once kamailio has started.

Blessings,
—
Daniel Donoghue





> On 13 Dec 2020, at 15:19, Syed Shahryar <syedshahryar at gmail.com> wrote:
> 
> This is a generic question about using environment variables in a config file.
> 
> If I want to use below where TLS_IP itself is a constant defined somewhere else. TLS_IP might be set via an env variable as well.
> 
> #!define TLS_TO_LISTEN tls:TLS_IP:$env(TLS_PORT)
> 
> Will that work? I see syntax errors and other weird issues. What's the right syntax?
> -- 
> --
> This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. Email transmission cannot be guaranteed to be secure or error-free, as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission. If verification is required, please request a hard-copy version.
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20201213/03428705/attachment.htm>


More information about the sr-users mailing list