<div dir="ltr"><div dir="ltr">Hi,<div><br><div class="gmail_quote"><div dir="ltr">On Wed, 12 Sep 2018 at 20:57, Daniel W. Graham <<a href="mailto:dan@cmsinter.net">dan@cmsinter.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_-1948391072932011668WordSection1">
<p class="MsoNormal">Yes, that output was from receiver. When using DB only and no DMQ, things work fine.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">No, I don’t have any calls to save on receiver or register handling in general. I was under the impression that DMQ / dmq_usrloc module handled this transparently.</p></div></div></blockquote><div><br></div><div>Apologies, I don't think I've explained it very clearly.</div><div><br></div><div>You must include register handling in the config of the receiving node, not to handle the KDMQ messages - they will be taken care of by dmq_handle_message() - but because on Kamailio startup, the usrloc module looks for calls to save() in the config in order to initiate the domains in memory. Since you don't have any, this is why `kamctl ul show` indicates there are no domains, and also why when dmq_usrloc receives a replicated contact, you see the error `add_contact(): Failed to get domain`. This is not a dmq thing, but a usrloc thing in general.</div><div><br></div><div>Please try including the same register handling code in your receiver config as you have in your sender config - even if the receiver will never handle registers directly. This is so that the usrloc module can properly initialise the domains in memory on startup. In a typical clustered environment, this will generally happen out-of-the-box, since all nodes will be identical, anyway, in order to enable load balancing/failover between them.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_-1948391072932011668WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have tried this previously though with no luck:<u></u><u></u></p>
<p class="MsoNormal">if (dmq_is_from_node()) {<u></u><u></u></p>
<p class="MsoNormal">                if (!save("location")) {<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in;text-indent:0.5in">
…<u></u><u></u></p>
<p class="MsoNormal">Receiver gets KDMQ message from sender, does the module then expose this to Kamailio as a normal REGISTER request based on user part of to header being ‘usrloc’?</p></div></div></blockquote><div><br></div><div>This will not work because dmq_usrloc serializes the updated contact details into the KDMQ message and then deserializes/handles the update directly the other side. It does not get exposed to the receiving Kamailio as a normal REGISTER.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_-1948391072932011668WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’ve shifted to using t_replicate and am happy with the results, but can still leverage DMQ so I’d like to get a working implementation.<u></u><u></u></p>
<p class="MsoNormal"><u></u> </p></div></div></blockquote><div><br></div><div>Using DMQ is without a doubt far simpler and more flexible.</div><div><br></div><div><br></div><div>Charles</div><div><br></div></div></div></div></div>

<br>
<div><font color="gray" style="font-size:10pt;font-family:Helvetica,Arial,sans-serif">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font><span style="font-size:10pt;font-family:Helvetica,Arial,sans-serif"> </span><font color="gray" style="font-size:10pt;font-family:Helvetica,Arial,sans-serif">Registered
                office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></div>