<div dir="ltr"><div>Hi Daniel!</div><div>I tried the patch, but it didn't work.... After some more debugging I noticed that actually the problem is in the replication via the dmq_usrloc module. The Kamailio which receives the registration can access the attributes despite the DB mode (also it works without your patch). The problem is that the replicated nodes don't have access to it. <br></div><div>Sorry my first impression was that the location attributes was not working with DB mode 0, but actually it is the DMQ replication failing to send contact attributes to other nodes...</div><div>I got this in the logs, may be helpful (the serialized data has nothing related to the xavp...)<br></div><div style="margin-left:40px"><span style="font-family:courier new,monospace">May 29 16:06:18 kamailio-2 /usr/sbin/kamailio[23230]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-5cee2114-5abe-2<br>May 29 16:06:18 kamailio-2 /usr/sbin/kamailio[23230]: DEBUG: usrloc [ucontact.c:73]: ucontact_xavp_store(): trying to clone per contact xavps<br>May 29 16:06:18 kamailio-2 /usr/sbin/kamailio[23230]: DEBUG: <core> [core/xavp.c:697]: xavp_clone_level_nodata(): cloned root xavp [ulattrs]<br>May 29 16:06:18 kamailio-2 /usr/sbin/kamailio[23230]: DEBUG: <core> [core/xavp.c:721]: xavp_clone_level_nodata(): cloned inner xavp [cluster_node]<br>May 29 16:06:18 kamailio-2 /usr/sbin/kamailio[23230]: DEBUG: usrloc [ucontact.c:1701]: update_ucontact(): exists callback for type= UL_CONTACT_UPDATE<br>May 29 16:06:18 kamailio-2 /usr/sbin/kamailio[23230]: DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7f51b624d418, callback type 2/15, id 1 entered<br>May 29 16:06:18 kamailio-2 /usr/sbin/kamailio[23230]: DEBUG: dmq_usrloc [usrloc_sync.c:776]: dmq_ul_cb_contact(): Callback from usrloc with type=2<br>May 29 16:06:18 kamailio-2 /usr/sbin/kamailio[23230]: DEBUG: dmq_usrloc [usrloc_sync.c:427]: init_usrloc_dmq_recv(): Initializing usrloc_dmq_recv for pid (23230)<br>May 29 16:06:18 kamailio-2 /usr/sbin/kamailio[23230]: DEBUG: dmq_usrloc [usrloc_sync.c:785]: dmq_ul_cb_contact(): Replicating local update to other nodes...<br>May 29 16:06:18 kamailio-2 /usr/sbin/kamailio[23230]: DEBUG: dmq_usrloc [usrloc_sync.c:746]: usrloc_dmq_send_contact(): sending serialized data {"action":1,"aor":"345671002","ruid":"uloc-5cee20df-5953-1","c":"sip:345671002@172.28.128.200:5060;rinstance=38e53fed7e84e081;transport=UDP","received":"","path":"<sip:172.28.128.102:5060;received=sip:172.28.128.200:5060;lr>","callid":"NOeeFh1Bh5JR0eJG8DENkg..","user_agent":"Z 3.15.40006 rv2.8.20","instance":"","expires":1559110577,"cseq":12,"flags":0,"cflags":3072,"q":-1,"last_modified":1559109977,"methods":4294967295,"reg_id":0,"server_id":0}<br>May 29 16:06:18 kamailio-2 /usr/sbin/kamailio[23230]: DEBUG: dmq_usrloc [usrloc_sync.c:315]: usrloc_dmq_send(): sending dmq broadcast...</span></div><div><br></div><div>I can open a ticket if the problem is confirmed!</div><div>Thanks,<br></div><div>Cheers,</div><div>Patrick Wakano<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 28 May 2019 at 17:17, Patrick Wakano <<a href="mailto:pwakano@gmail.com">pwakano@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Wow, that was fast!</div><div>I will try later on and let you know!</div><div>Thanks Daniel for your time and effort! Really appreciate it!</div><div><br></div><div>Cheers,</div><div>Patrick Wakano<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 28 May 2019 at 17:00, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>can you try with master branch or apply the patch from next
      commit?</p>
    <p>  -
<a class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/commit/76f0fa8a0330de3885f5f3830eb90061c59045d4" target="_blank">https://github.com/kamailio/kamailio/commit/76f0fa8a0330de3885f5f3830eb90061c59045d4</a><br>
    </p>
    <div class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-cite-prefix">If works ok, then I will backport.</div>
    <div class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-cite-prefix"><br>
    </div>
    <div class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-cite-prefix">Cheers,<br>
      Daniel</div>
    <div class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-cite-prefix"><br>
    </div>
    <div class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-cite-prefix">On 28.05.19 08:30, Patrick Wakano
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Forgot to mention I am using version 5.2.2.</div>
        <div># kamailio -v<br>
          version: kamailio 5.2.2 (x86_64/linux) 67f967<br>
          flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
          USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM,
          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<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: 67f967 <br>
          compiled on 11:40:41 Mar 11 2019 with gcc 4.8.5<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, 28 May 2019 at 16:26,
          Patrick Wakano <<a href="mailto:pwakano@gmail.com" target="_blank">pwakano@gmail.com</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">
            <div>Hello list,</div>
            <div>Hope you all doing well!</div>
            <div><br>
            </div>
            <div>I am trying to use the extra attributes (xavp_contact)
              of the usrloc module to save some additional info about
              the user. <br>
            </div>
            <div>I am setting the value before the save() and doing a
              call to registered() (not lookup()) before trying to
              access these extra attributes. This works fine with
              db_mode=3 but does not work in case of db_mode=0. <br>
            </div>
            <div>Does anyone knows if it should also work with mode 0? I
              was expecting it to work but a call to kamcmd ul.dump show
              nothing related.....<br>
            </div>
            <div>I don't want to use the DB for the location purposes
              because I prefer to have multiple servers using the
              dmq_usrloc (that works like a charm!) and it conflicts
              with DB persistence of the location table (when the DMQ
              replication happens, all servers (sharing the same DB) try
              to save the same user info in the location table)</div>
            <div><br>
            </div>
            <div>Thank you,</div>
            <div>Kind regards,</div>
            <div>Patrick Wakano<br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044mimeAttachmentHeader"></fieldset>
      <pre class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="gmail-m_-2263749173092785699gmail-m_-6855792575629126044moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a></pre>
  </div>

</blockquote></div>
</blockquote></div>