I don't think macro replacement works inside of strings. I believe you should be able
to achieve what you want using
[#!defexp](https://github.com/kamailio/kamailio-wiki/blob/main/docs/cookbooks/5.7.x/core.md#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 or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3800#issuecomment-2035042424
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3800/2035042424(a)github.com>