[SR-Users] DMQ - Failed to get domain

Charles Chance charles.chance at sipcentric.com
Fri Sep 14 11:38:41 CEST 2018


Hi,

On Wed, 12 Sep 2018 at 20:57, Daniel W. Graham <dan at cmsinter.net> wrote:

> Yes, that output was from receiver. When using DB only and no DMQ, things
> work fine.
>
>
>
> 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.
>

Apologies, I don't think I've explained it very clearly.

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.

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.


>
> I have tried this previously though with no luck:
>
> if (dmq_is_from_node()) {
>
>                 if (!save("location")) {
>
>>
> 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’?
>

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.


>
>
> 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.
>
>
>

Using DMQ is without a doubt far simpler and more flexible.


Charles

-- 
Sipcentric Ltd.
                Company registered in England & Wales no. 
7365592. Registered
                office: Faraday Wharf, Innovation 
Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180914/a2ab633a/attachment.html>


More information about the sr-users mailing list