来自工单,个人觉得很不错
不翻译了,只要认真看,都可以看懂
#!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");