<h3>Description</h3>
<p>I'm testing the presence feature, on branch 5.2 last version <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/kamailio/kamailio/commit/1e56e4df35865f7138565213e35da8fd32096332/hovercard" href="https://github.com/kamailio/kamailio/commit/1e56e4df35865f7138565213e35da8fd32096332"><tt>1e56e4d</tt></a> .<br>
modparam("presence_xml", "db_url", DBURL)<br>
Can not set db_url of the presence_xml correct value. presence_xml db_url always the default value(DEFAULT_DB_URL). The same way, presence db_url is right.</p>
<h4>Debugging Data</h4>
<p>presence.cfg file:</p>
<pre><code>debug=3
#!define DBURL "mysql://kamailio:kamailiorw@localhost/kamailio52"

/* set paths to location of modules */
mpath="/usr/local/kamailio/lib64/kamailio/modules/"

loadmodule "db_mysql.so"
loadmodule "tm.so"
loadmodule "sl.so"

loadmodule "presence.so"
loadmodule "presence_xml.so"

modparam("presence", "db_url", DBURL)

modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "integrated_xcap_server", 1)

request_route {
        exit;
}
</code></pre>
<h4>Log Messages</h4>
<pre><code>0(76822) DEBUG: <core> [core/sr_module.c:896]: init_mod(): presence
 0(76822) DEBUG: presence [presence.c:282]: mod_init(): db_url=mysql://kamailio:kamailiorw@localhost/kamailio52/48/0x102b9e860
....
0(76822) DEBUG: <core> [core/sr_module.c:896]: init_mod(): presence_xml
 0(76822) DEBUG: presence_xml [presence_xml.c:159]: mod_init(): db_url=mysql://kamailio:kamailiorw@localhost/kamailio/46/0x103cf2d64
...
 0(76822) DEBUG: presence_xml [add_events.c:139]: xml_add_events(): added 'xcap-diff' event to presence module
 0(76822) DEBUG: <core> [core/sr_module.c:619]: find_mod_export_record(): found export of <db_bind_api> in module db_mysql [/usr/local/kamailio/lib64/kamailio/modules/db_mysql.so]
 0(76822) DEBUG: <core> [db.c:210]: db_bind_mod(): using db bind api for db_mysql
 0(76822) DEBUG: <core> [db.c:315]: db_do_init2(): connection 0x102bac2e8 not found in pool
 0(76822) DEBUG: db_mysql [km_my_con.c:108]: db_mysql_new_connection(): opening connection: mysql://xxxx:xxxx@localhost/kamailio
 0(76822) ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection(): driver error: Unknown database 'kamailio'
 0(76822) ERROR: <core> [db.c:319]: db_do_init2(): could not add connection to the pool 0(76822) ERROR: presence_xml [presence_xml.c:214]: mod_init(): while connecting to database
 0(76822) ERROR: <core> [core/sr_module.c:899]: init_mod(): Error while initializing module presence_xml (/usr/local/kamailio/lib64/kamailio/modules/presence_xml.so)
ERROR: error while initializing modules

</code></pre>
<p>The correct db_url is #!define DBURL "mysql://kamailio:kamailiorw@localhost/kamailio52"<br>
I don't know why presence_xml db_url always the default value in the source code DEFAULT_DB_URL.</p>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>version: kamailio 5.2.0 (x86_64/darwin) 1e56e4
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, select, kqueue.
id: 1e56e4
compiled on 23:15:49 Jan 12 2019 with gcc Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 Apple LLVM version 10.0.0 (clang-1000.11.45.5) Target: x86_64-apple-darwin18.2.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>MacOS
</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/1809">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZZ4WP3F9HhjA5LsO6YRehPoGn1q2ks5vCgVRgaJpZM4Z8tyV">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZegxNt672yFB6AJ9Qw8hQCdyaXumks5vCgVRgaJpZM4Z8tyV.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"presence_xml db_url param can not set (#1809)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1809"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1809",
"url": "https://github.com/kamailio/kamailio/issues/1809",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>