Thanks, I'll look into it. :) 

On Mon, Apr 29, 2024 at 12:03 PM Olle E. Johansson <oej@edvina.net> wrote:


On 28 Apr 2024, at 10:57, Pavan Kumar via sr-users <sr-users@lists.kamailio.org> wrote:

Hi everyone,

I am trying to assign environment variable as follows

listen=udp:0.0.0.0:5060 advertise $env(MY_IP):5060

Looks like using the environment variable as above is an invalid configuration.

Is there a way to use IP from env var to advertise. Even better, is there a way to use result in a stun query as an advertised address?

The config variables (called pseudo-variables in documentation) can only be used in the routing scripts, not in the core parameters section.

There is a way to add defines for substitution on the command line and use them though. Check the documentation in the core cookbook on how to use defines and the command line help for more information.

/O