<p>Before the changes the xml was always the same:</p>

<p>UL_CONTACT_UPDATE -> state="active" event="registered"</p>

<pre><code>Jul 15 13:48:14 sp1 proxy[25780]: DEBUG: pua_reginfo [usrloc_cb.c:240]: reginfo_usrloc_cb(): AOR: 88835677110000@A.A.A.A (location)
Jul 15 13:48:14 sp1 proxy[25780]: DEBUG: pua_reginfo [usrloc_cb.c:242]: reginfo_usrloc_cb(): type= UL_CONTACT_UPDATE
Jul 15 13:48:14 sp1 proxy[25780]: DEBUG: pua_reginfo [usrloc_cb.c:108]: build_reginfo_full(): Contact sip:88835677110000@D.D.D.D:35315;transport=TLS;ob, 0x7f916090ce38
Jul 15 13:48:14 sp1 proxy[25780]: DEBUG: pua_reginfo [usrloc_cb.c:296]: reginfo_usrloc_cb(): XML-Body:#012<?xml version="1.0"?>#012<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" version="0" state="full">#012  <registration aor="sip:88835677110000@A.A.A.A" id="0x7f9224e47260" state="active">#012    <contact id="0x7f916090ce38" state="active" event="registered" expires="300" callid="KlIcAz1dRJNMn-Le.83MbT8tqGFZ4nXp" cseq="35175" received="sip:B.B.B.B:44214;transport=tls" path="&lt;sip:lb@C.C.C.C;lr;received=sip:B.B.B.B:44214%3Btransport%3Dtls;socket=sip:A.A.A.A:5061&gt;" user_agent="forfoneSip r1 / hammerhead-22">#012      <uri>sip:88835677110000@D.D.D.D:35315;transport=TLS;ob</uri>#012    </contact>#012  </registration>#012</reginfo>#012
Jul 15 13:48:14 sp1 proxy[25780]: DEBUG: pua_reginfo [usrloc_cb.c:298]: reginfo_usrloc_cb(): Contact sip:88835677110000@D.D.D.D:35315;transport=TLS;ob, 0x7f916090c908
</code></pre>

<p>UL_CONTACT_DELETE -> state="active" event="registered"</p>

<pre><code>Jul 15 13:49:29 sp1 proxy[25775]: DEBUG: pua_reginfo [usrloc_cb.c:240]: reginfo_usrloc_cb(): AOR: 88835677220000@A.A.A.A (location)
Jul 15 13:49:29 sp1 proxy[25775]: DEBUG: pua_reginfo [usrloc_cb.c:244]: reginfo_usrloc_cb(): type= UL_CONTACT_DELETE
Jul 15 13:49:29 sp1 proxy[25775]: DEBUG: pua_reginfo [usrloc_cb.c:108]: build_reginfo_full(): Contact sip:88835677220000@E.E.E.E:55323;transport=TLS;ob, 0x7f916090d360
Jul 15 13:49:29 sp1 proxy[25775]: DEBUG: pua_reginfo [usrloc_cb.c:296]: reginfo_usrloc_cb(): XML-Body:#012<?xml version="1.0"?>#012<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" version="0" state="full">#012  <registration aor="sip:88835677220000@A.A.A.A" id="0x7f9224e47260" state="active">#012    <contact id="0x7f916090d360" state="active" event="registered" expires="153" callid="tx2XjrkuqYlZ44PfliHvGEK4Her3IYcU" cseq="38095" received="sip:F.F.F.F:55323;transport=tls" path="&lt;sip:lb@C.C.C.C;lr;received=sip:F.F.F.F:55323%3Btransport%3Dtls;socket=sip:A.A.A.A:5061&gt;" user_agent="forfoneSip r1 / mako-22">#012      <uri>sip:88835677220000@E.E.E.E:55323;transport=TLS;ob</uri>#012    </contact>#012  </registration>#012</reginfo>#012
Jul 15 13:49:29 sp1 proxy[25775]: DEBUG: pua_reginfo [usrloc_cb.c:298]: reginfo_usrloc_cb(): Contact sip:88835677220000@E.E.E.E:55323;transport=TLS;ob, 0x7f916090ce38
</code></pre>

<p>After changes: <br>
UL_CONTACT_DELETE -> state="terminated" event="unregistered"</p>

<pre><code>Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:248]: reginfo_usrloc_cb(): AOR: 88835677110000@A.A.A.A (location)
Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:252]: reginfo_usrloc_cb(): type= UL_CONTACT_DELETE
Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:106]: build_reginfo_full(): Updated Contact sip:88835677110000@B.B.B.B:58446;transport=TLS;ob[uloc-55a66069-1c88-4], 0x7f6cb06f2170
Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:112]: build_reginfo_full(): Contact sip:88835677110000@B.B.B.B:58446;transport=TLS;ob[uloc-55a66069-1c88-4], 0x7f6cb06f2170
Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:304]: reginfo_usrloc_cb(): XML-Body:#012<?xml version="1.0"?>#012<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" version="0" state="full">#012  <re
gistration aor="sip:88835677110000@A.A.A.A" id="0x7f6d74c44260" state="terminated">#012    <contact id="0x7f6cb073b0c0" state="terminated" event="unregistered" expires="163" callid="bpTyIZoJHDoF1edNqQ9oHmEgT7
tBEq25" cseq="20241" received="sip:C.C.C.C:54129;transport=tls" path="&lt;sip:lb@F.F.F.F;lr;received=sip:C.C.C.C:54129%3Btransport%3Dtls;socket=sip:A.A.A.A:5061&gt;" user_agent="forfoneSip r1 / hammerhead-22">#012      <uri>sip:88835677110000@B.B.B.B:58446;transport=TLS;ob</uri>#012    </contact>#012  </registration>#012</reginfo>#012
Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:306]: reginfo_usrloc_cb(): Contact sip:88
835677110000@B.B.B.B:58446;transport=TLS;ob, 0x7f6cb073ab90
</code></pre>

<p>UL_CONTACT_UPDATE -> state="active" event="refreshed"</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/247'>https://github.com/kamailio/kamailio/pull/247</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>pua_reginfo: use ul.get_urecord_by_ruid instead of ul.get_urecord</li>
  <li>pua_reginfo: use ruid to fix comparation of contact</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/247/files#diff-0">modules/pua_reginfo/usrloc_cb.c</a>
    (24)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/247.patch'>https://github.com/kamailio/kamailio/pull/247.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/247.diff'>https://github.com/kamailio/kamailio/pull/247.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/pull/247">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36Ze-CcHIGP-YD2PMTgEIB7wMOFcoaks5odmQdgaJpZM4FZHCo.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/kamailio/kamailio/pull/247"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>