Hi I'm aware that to get environment variable we can use `$env(varname)` however this require to load pv module first, eg: below:
``` loadmodule "pv" #!substdef "/DBRWUSER/$env(DBRWUSER)/g" #!substdef "/DBRWPW/$env(DBRWPW)/g" ```
in some case we need to get variable at the beginning (or convenient way or modern application), example:
``` alias=$getenv(DOMAIN) listen="$getenv(PRIVATE_IP)" advertise "$getenv(PUBLIC_IP)" ```
** $getenv just name of new function is similar to $env but not require pv
Questions about using and configuring kamailio have to be addressed to sr-users@lists.kamailio.org mailing list.
As a quick info, see the `#!defenv` and `#!defenvs`, they should help -- if you need to discuss more, see the above note. This is going to be closed.
Closed #3558 as completed.
Hi @miconda I'm not asking on how to use defenv (because it does not work without pv module), I would request a function that can get environment variable without need pre-load module. like defenv or defenvs but can be execute at the beginning of script