<p>If the usrloc parameter "xavp_contact" is set, the given XAVP is populated with the contact attributes when the "lookup" function is called. The usrloc README example uses the name 'ulattrs'.</p>

<p>The tm module parameters 'contacts_avp' and 'contact_flows_avp' are populated when the t_load_contacts() function is called. These store the data from the branch structures but, before my changes, did not know anything about the attributes loaded by usrloc. </p>

<p>My changes mean that the usrloc attributes are now loaded into the 'contacts_avp' data when t_load_contacts() is called. However, the tm module needs to know the name of the XAVP that usrloc stored these attributes in, hence the new parameter and why they must have the same value.</p>

<p>If you do not set the 'xavp_contact' parameter in usrloc, then attributes are not stored / loaded when you call 'register' / 'lookup'. It is therefore not needed in tm module either.<br>
If you supply the parameter to usrloc, but NOT tm, then the attributes are ignored by the load/next_contacts functions and the bug will still be present.</p>

<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/178#issuecomment-111520934">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZdNwsaVk0RKXdapBSjz9G4qovB7qks5oSu1lgaJpZM4Er60H.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/178#issuecomment-111520934"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>