<div dir="ltr">I have an scenario with two kamailios, and no databases. At the first, I authenticate one subscriber successfully and save in memory usrloc:<br><br><br>/etc/kamailio # kamailio --version<br>version: kamailio 5.4.4 (x86_64/linux)<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_BLACKLIST, 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: unknown<br>compiled on 16:13:18 Feb 15 2021 with gcc 9.3.0<br>/etc/kamailio #<br>/etc/kamailio #<br><br>---<div><br>/etc/kamailio # cat /etc/os-release<br>NAME="Alpine Linux"<br>ID=alpine<br>VERSION_ID=3.12.3<br>PRETTY_NAME="Alpine Linux v3.12"<br>HOME_URL="<a href="https://alpinelinux.org/">https://alpinelinux.org/</a>"<br>BUG_REPORT_URL="<a href="https://bugs.alpinelinux.org/">https://bugs.alpinelinux.org/</a>"<br><br>---<div><br> # Handle SIP registrations<br>route[REGISTRAR] {<br>     if (!is_method("REGISTER")) return;<br><br>       if (!save("location","0x05")) {<br>           sl_reply_error();<br>     }<br>     exit;<br>}<br><br><br>--<br><br><br>/etc/kamailio # kamcmd ul.dump<br>{<br>        Domains: {<br>                Domain: {<br>                        Domain: location<br>                        Size: 1024<br>                        AoRs: {<br>                                Info: {<br>                                        AoR: 1014@my.domain<br>                                        HashID: -1989102610<br>                                        Contacts: {<br>                                                Contact: {<br>                                                        Address: sip:1014@10.0.0.2:7071;ob<br>                                                        Expires: 299<br>                                                        Q: -1.000000<br>                                                        Call-ID: d5cf6d5f293647a59ba64ba996a793b0<br>                                                        CSeq: 43689<br>                                                        User-Agent: MicroSIP/3.20.7<br>                                                        Received: sip:<a href="http://10.0.0.2:7071">10.0.0.2:7071</a><br>                                                        Path: [not set]<br>                                                        State: CS_NEW<br>                                                        Flags: 1<br>                                                        CFlags: 0<br>                                                        Socket: [not set]<br>                                                        Methods: 8159<br>                                                        Ruid: uloc-62d95ca2-3c-1<br>                                                        Instance: [not set]<br>                                                        Reg-Id: 0<br>                                                        Server-Id: 0<br>                                                        Tcpconn-Id: -1<br>                                                        Keepalive: 0<br>                                                        Last-Keepalive: 1658412252<br>                                                        KA-Roundtrip: 0<br>                                                        Last-Modified: 1658412252<br>                                                }<br>                                        }<br>                                }<br>                        }<br>                        Stats: {<br>                                Records: 1<br>                                Max-Slots: 1<br>                        }<br>                }<br>        }<br>}<br>/etc/kamailio # <br><br><br><br><b>The problem is</b>: when I start the second kamailio server, the current usrloc users are not replicated to it, so in the second server the usrloc is empty:<br><br><br><br>/etc/kamailio # kamcmd ul.dump<br>{<br>        Domains: {<br>                Domain: {<br>                        Domain: location<br>                        Size: 1024<br>                        AoRs: {<br>                        }<br>                        Stats: {<br>                                Records: 0<br>                                Max-Slots: 0<br>                        }<br>                }<br>        }<br>}<br><br><br><br><b>The modules loaded:</b><br><br> - dmq.so<br> - dmq_usrloc.so<br><br><b>Params (sync enabled):</b><br><br>modparam("dmq_usrloc", "enable", 1)<br>modparam("dmq_usrloc", "sync", 1)<br>modparam("dmq_usrloc", "usrloc_domain", "location")<br>modparam("dmq_usrloc", "usrloc_delete", 1)<br>modparam("dmq_usrloc", "replicate_socket_info", 0)<br><br><br><b>Obs</b>: The DMQ replication is working perfectly. So, if I register another user in server 1, server 2 receives the KDMQ message and the new user appears on usrloc. The real problem is to load pre registered users at startup.<br><br><b>Log messages from second server at startup:</b><br><br><br>0(51) DEBUG: <core> [core/sr_module.c:873]: init_mod(): dmq_usrloc<br> 0(51) INFO: dmq_usrloc [dmq_usrloc.c:81]: mod_init(): dmq usrloc replication mode = 1<br> 0(51) DEBUG: <core> [core/sr_module.c:652]: find_mod_export_record(): found export of <ul_bind_usrloc> in module usrloc [/usr/lib/kamailio/modules/usrloc.so]<br> 0(51) DEBUG: <core> [core/sr_module.c:652]: find_mod_export_record(): found export of <bind_dmq> in module dmq [/usr/lib/kamailio/modules/dmq.so]<br> 0(51) DEBUG: dmq_usrloc [usrloc_sync.c:286]: usrloc_dmq_initialize(): loaded dmq api<br> 0(51) DEBUG: dmq_usrloc [usrloc_sync.c:299]: usrloc_dmq_initialize(): dmq peer registered<br> 0(51) DEBUG: dmq_usrloc [dmq_usrloc.c:111]: mod_init(): dmq_usrloc initialized<br><br> 0(51) DEBUG: <core> [core/sr_module.c:804]: init_mod_child(): idx 0 rank -127: dmq_usrloc [main]<br> 0(51) DEBUG: dmq_usrloc [dmq_usrloc.c:127]: child_init(): child_init PROC_INIT<br><br> 7(62) DEBUG: dmq_usrloc [usrloc_sync.c:552]: usrloc_dmq_request_sync(): requesting sync from dmq peers<br> 0(51) DEBUG: <core> [core/sr_module.c:804]: init_mod_child(): idx 0 rank 0: dialog [main]<br> 7(62) DEBUG: dmq_usrloc [usrloc_sync.c:568]: usrloc_dmq_request_sync(): sending serialized data {"action":3}<br> 7(62) DEBUG: dmq_usrloc [usrloc_sync.c:317]: usrloc_dmq_send(): sending dmq broadcast...<br><br> 7(62) DEBUG: dmq [dmq_funcs.c:166]: bcast_dmq_message1(): skipping node sip:<a href="http://10.0.2.38:5090">10.0.2.38:5090</a><br> 7(62) DEBUG: dmq [dmq_funcs.c:166]: bcast_dmq_message1(): skipping node sip:<a href="http://10.0.2.30:5090">10.0.2.30:5090</a><br> 7(62) DEBUG: dmq [dmq_funcs.c:166]: bcast_dmq_message1(): skipping node sip:<a href="http://0.0.0.0:5090">0.0.0.0:5090</a><br><br><br><br><br><b>List nodes at SERVER 1:</b><br><br><br>/etc/kamailio # kamcmd dmq.list_nodes<br>{<br>        host: 10.0.1.36<br>        port: 5090<br>        resolved_ip: 10.0.1.36<br>        status: active<br>        last_notification: 0<br>        local: 0<br>}<br>{<br>        host: 10.0.1.35<br>        port: 5090<br>        resolved_ip: 10.0.1.35<br>        status: active<br>        last_notification: 0<br>        local: 0<br>}<br>{<br>        host: 0.0.0.0<br>        port: 5090<br>        resolved_ip: 0.0.0.0<br>        status: active<br>        last_notification: 0<br>        local: 1<br>}<br><br><br><br><b>List nodes at SERVER 2:</b><br><br><br>/etc/kamailio # kamcmd dmq.list_nodes<br>{<br>        host: 10.0.1.35<br>        port: 5090<br>        resolved_ip: 10.0.1.35<br>        status: active<br>        last_notification: 0<br>        local: 0<br>}<br>{<br>        host: 10.0.1.36<br>        port: 5090<br>        resolved_ip: 10.0.1.36<br>        status: active<br>        last_notification: 0<br>        local: 0<br>}<br>{<br>        host: 0.0.0.0<br>        port: 5090<br>        resolved_ip: 0.0.0.0<br>        status: active<br>        last_notification: 0<br>        local: 1<br>}<br><br><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="font-family:Arial,Helvetica,sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:20.799999237060547px;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none"><span style="font-family:'times new roman',serif"><br><font size="2"><font style="color:rgb(0,0,0)" size="2">Att,<br>Benedito Marques</font></font></span></span></div><div dir="ltr"><span style="font-family:Arial,Helvetica,sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:20.799999237060547px;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none"><span style="font-family:'times new roman',serif"><font size="2"><font style="color:rgb(0,0,0)" size="2"><br></font></font></span></span></div></div></div></div></div>