registrar - match changes
add param match_flags bit mask 1 callid 2 received 3 contact add param match_return_flags - bit mask 1 add contact xavp in registered adds or sets into the transaction in reg_fetch_contacts adds to plc structure changes to registered check the match_flags bit mask value and tries to find correspondent field in xavp_cfg matches with the fields found also looks for match_flags, match_return_flags in xavp_cfg to override the params preserves existing behaviour removes reg_callid_avp
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 branchesit acts like lookup_to_dest without appending branches
benefits, used in conjuction with usrloc param xavp_contactprior 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)}
beforeif( registered("location", "$fu") ) {## lookup_to_dset("location", "$fu") ## not availablelookup("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)");
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, May 27-29, 2015 Berlin, Germany - http://www.kamailioworld.com