<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">if you want to use DMQ for synchronizing usrloc information, I think just calling dmq_handling_message() is enough. The save() call in the Server 1 (proxy) should not be necessary.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Try to deactivate it and see if it still synchronizing (e.g. by looking with ngrep for KDMQ messages). If not, there is a problem with the DMQ cluster, which would explain also the missing
 sync on startup.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">-- <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning Westerholt –
</span><span style="mso-fareast-language:EN-US"><a href="https://skalatan.de/blog/"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Kamailio services –
</span><span style="mso-fareast-language:EN-US"><a href="https://gilawa.com/"><span lang="EN-GB" style="color:#0563C1">https://gilawa.com</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b> sr-dev <sr-dev-bounces@lists.kamailio.org>
<b>On Behalf Of </b>Hardik Patel<br>
<b>Sent:</b> Wednesday, November 3, 2021 4:11 PM<br>
<b>To:</b> sr-dev@lists.kamailio.org<br>
<b>Subject:</b> [sr-dev] DMQ userloc data not replicated after restarting the receiver service.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hello Team,<br>
<br>
We are using Kamailio 5.5.2 (DMQ + usrloc) modules. We want to replicate all users from server-2(Registration) to server-1(Proxy) .<br>
<br>
Replication worked perfectly fine but we noticed that after restarting the receiver (Proxy node) data has not been replicated automatically. If we re-register the users it is replicating to the receiver side but the old data is not replicated.<br>
<br>
Can you please guide us where we made the mistake?<br>
<br>
Please find the configuration<br>
<br>
<br>
SERVER-1 (Proxy)<br>
========================<br>
<br>
#--- dmq db param ----<br>
modparam("dmq","server_address","sip:<a href="http://10.128.77.187:5060">10.128.77.187:5060</a>")<br>
modparam("dmq", "notification_address", "sip:<a href="http://10.128.77.188:5060">10.128.77.188:5060</a>")<br>
modparam("dmq", "num_workers", 6)<br>
modparam("dmq", "multi_notify", 1)<br>
#modparam("dmq", "worker_usleep", 0)<br>
modparam("dmq", "ping_interval", 60)<br>
<br>
#--- dmq usrloc db param ----<br>
modparam("dmq_usrloc", "enable", 1)<br>
modparam("dmq_usrloc", "replicate_socket_info", 1)<br>
modparam("dmq_usrloc", "sync", 1)<br>
modparam("dmq_usrloc", "batch_size", 2000)<br>
modparam("dmq_usrloc", "batch_usleep", 1000)<br>
<br>
route[KMDQ_SAVE_LOCATION] {<br>
<br>
        if(is_method("KDMQ")) {<br>
                dmq_handle_message();<br>
        }<br>
        if (dmq_is_from_node()) {<br>
                if(!save("location"))<br>
                        xlogl("L_ERR", "Error saving contact\n");<br>
        }<br>
}<br>
<br>
SERVER-2 (Registration)<br>
======================<br>
<br>
#--- dmq db param ----<br>
modparam("dmq","server_address","sip:<a href="http://10.128.77.188:5060">10.128.77.188:5060</a>")<br>
modparam("dmq", "notification_address", "sip:<a href="http://10.128.77.187:5060">10.128.77.187:5060</a>")<br>
modparam("dmq", "num_workers", 6)<br>
modparam("dmq", "multi_notify", 1)<br>
modparam("dmq", "ping_interval", 60)<br>
<br>
#--- dmq usrloc db param ----<br>
modparam("dmq_usrloc", "enable", 1)<br>
modparam("dmq_usrloc", "replicate_socket_info", 1)<br>
modparam("dmq_usrloc", "sync", 1)<br>
modparam("dmq_usrloc", "batch_size", 2000)<br>
modparam("dmq_usrloc", "batch_usleep", 1000)<br>
<br>
route[SAVE_LOCATION]{<br>
        save("location");<br>
}<br>
<br>
<br>
version: kamailio 5.5.2 (x86_64/linux) e2b6cc<br>
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST,
 HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED<br>
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB<br>
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>
id: e2b6cc <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hardik Patel<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>