Thanks Daniel.
I found your posting four years ago about saving one contact per user
http://lists.kamailio.org/pipermail/devel/2008-October/016273.html
and used save("location", "0x04"). However, I noticed a problem with
this.
The contact is not storing in the memory. Whenever there is a
Reregistration
happening, the contact is briefly not available for routing.
Then I looked at the resgistrar code, I am befuddled.
-- code snippet:
/*! \brief
* Wrapper to save(location)
*/
static int w_save(struct sip_msg* _m, char* _d, char* _cflags)
{
return save(_m, (udomain_t*)_d, ((int)(unsigned long)_cflags));
}
The string "0x04" looks like getting type-casted to long.
Krish Kura
On Thu, Mar 22, 2012 at 11:11 AM, Daniel-Constantin Mierla <
miconda(a)gmail.com> wrote:
Hello,
if you don't use the other contacts, then might be simpler to just store
one contact per AoR (which will be from last registration) -- see save(...)
second parameter flags.
Don't remember by hart, but registrar or usrloc has a parameter to control
whether to add or not additional branches from a location lookup - check
the readmeas, but I am not sure the first result is the most recent, you
would have to test it or check the sources.
The last coming in my mind right now would be to program it in config via
reg_fetch_contacts() and $ulc(...).
Cheers,
Daniel
On 3/22/12 4:49 PM, Krishna Kurapati wrote:
Hi,
I am trying to relay the message to the Registered user. However, I
would like to relay only to a recent contact.
In case, there are multiple contact, I do not want to relay to older
contacts.
I am using t_relay() which is currently forking the request to all
contacts.
Any other way to accomplish my need?
Thanks
Krish Kura
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin,
Germanyhttp://www.asipto.com/index.php/kamailio-advanced-training/