Hello,
for convenience, I added command line parameters to set #!subst, #!substdef and #!substdefs expressions - details about them in the wiki:
* https://www.kamailio.org/wiki/cookbooks/devel/core#subst
It is only in master branch, being new features, but maybe you can test and report if they work fine. It should be like:
kamailio --subst="%DBURL%mysql://admin:mypass@db.mydomaincom/kamailio%" ...
And in kamailio.cfg:
modparam("acc", "db_url", "DBURL") ... modparam("sqlops","sqlcon", "cb=>DBURL") ... modparam("sqlops","sqlcon", "asg=>DBURL")
Cheers, Daniel
On 12.05.19 23:51, David Villasmil wrote:
Finally figured out how to do it:
cfg: modparam("acc", "db_url", DBURL) ... modparam("sqlops","sqlcon", CBDBURL) ... modparam("sqlops","sqlcon", ASGDBURL)
and startup:
kamailio -f /etc/kamailio/kamailio.cfg -E \ -A 'DBURL="mysql://admin:mypass@db.mydomaincom/kamailio"' \ -A "CBDBURL="cb=>admin:mypass@db.mydomaincom/kamailio"" \ -A 'ASGDBURL="asg=>admin:mypass@db.mydomaincom/kamailio"' -DDDD 2>&1
Now let's try and put that on the startup systemd script.