<p></p>
<p>I finally got around to test this but it seems I'm doing something wrong:</p>
<pre><code>#!substdef "/DBRWUSER/$env(DBRWUSER)/g"
#!substdef "/DBRWPW/$env(DBRWPW)/g"
#!substdef "/DBHOST/$env(DBHOST)/g"
#!substdef "/DBNAME/$env(DBNAME)/g"
#!define DBURL "mysql://DBRWUSER:DBRWPW@DBHOST/DBNAME"
</code></pre>
<p>Now trying to start Kamailio (5.3.3 as suggested) fails:</p>
<pre><code>kamailio_1 | 0(1) ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "env"
kamailio_1 | 0(1) ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [D/68] in [$env(DBRWUSER)/g] at [5 (5)]
kamailio_1 | 0(1) ERROR: <core> [core/re.c:170]: parse_repl(): bad specifier in replace part /$env(DBRWUSER)/g
kamailio_1 | 0(1) ERROR: <core> [core/ppcfg.c:69]: pp_subst_add(): bad subst expression: /DBRWUSER/$env(DBRWUSER)/g
kamailio_1 | 0(1) ERROR: <core> [core/ppcfg.c:96]: pp_substdef_add(): subst rule cannot be added
</code></pre>
<p>I also tried the following but it doesn't make a difference:</p>
<pre><code>#!substdef "!DBURL!mysql://$env(DBRWUSER):$env(DBRWPW)@$env(DBHOST)/$env(DBNAME)!"
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2276#issuecomment-619975406">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPAWWP6SDBDSMUPKUTROV74DANCNFSM4MDE4KVA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZI75LCUA4SXZJ2DEK3ROV74DA5CNFSM4MDE4KVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOET2BF3Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2276#issuecomment-619975406",
"url": "https://github.com/kamailio/kamailio/issues/2276#issuecomment-619975406",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>