I don't think macro replacement works inside of strings. I believe you should be able to achieve what you want using #!defexp, as the examples in the core documentation are nearly identical to your example.
#!define IPADDR 127.0.0.1
#!defexp SIPURI "sip:" + IPADDR + ":5060"
#!defexp QSIPURI '"sip:' + IPADDR + ':5060"'
#!defexp V16 1<<4
Another possibility is using modparamx()
and interpolating your strings there:
#!defenv MYSQL_IP
#!modparamx("permissions, "db_url", "mysql://kamailio:kamailio@$def(MYSQL_IP)/kamailio");
Or even just:
#!modparamx("permissions, "db_url", "mysql://kamailio:kamailio@$env(MYSQL_IP)/kamailio");
The last form having the advantage that it's not available via the core.ppdefines_full
rpc function thus reducing one possible point of exposure.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.