Hi,

please consider the addition of these features to master branch.

you can view the full PR in https://github.com/kamailio/kamailio/pull/91

the purpose of these additional features is to provide better information to configuration script to help in complex routing decisions and adding custom headers based on rich information. 

registrar - add user xavp on successful registered call

this commit adds the contact xavp when we call registered()
it acts like lookup without rewriting uri or appending branches
it acts like lookup_to_dest without appending branches

benefits, used in conjuction with usrloc param xavp_contact
prior to this commit, we would have to use sqlops to make a select directly into location_attrs, but not all sb engines support raw query or we would need to call lookup causing the unnecessary and unwanted set of the ruri.

modparam("usrloc", "xavp_contact", "ulattrs")
..
if(registered("location", "$fu") ) {
   $xavp(ulattrs=>my extended information about the contact)
}

before
if( registered("location", "$fu") ) {
##    lookup_to_dset("location", "$fu") ## not available
    lookup("location", "$fu")
   $xavp(ulattrs=>my extended information about the contact)
    

registrar - add optional avp params for usrloc comparison

reg_received_avp - match with received field
reg_contact_avp - match with contact field

this commit adds 2 optional params to be used on the registered function

prior to this commit, the only restriction available when calling registered was by using a call-id.
the 2 params added allow the match to be more restrictive
. by received column
. by contact column


registrar - add xavp to reg_fetch_contacts

modparams("usrloc", "xavp_contact", "ulattrs");

this commit adds the usrloc xavp_contact to the returned structure.
reg_fetch_contacts("location", "$fu", "caller");
xlog("L_INFO", "$fu xavp = $ulc(caller=>received)");
xlog("L_INFO", "$fu xavp = $ulc(caller=>ulattrs=>MyExtendedInfoOnUser)");

Thank You