Hello,
I just added to svn a new function for registrar module: uunregister(domain, uri), see commit:
http://openser.svn.sourceforge.net/viewvc/openser?view=rev&revision=5010
The patch is small and clean. Backport to 1.4.1 should be straightforward.
This function should help you to achieve the desired behavior: if register has expires > 0 then call first
unregister("location", "$tu");
then
save("location");
The unregister() function removes all contact associated with the address in parameter 'uri'.
I am looking also to actually enhance save() function to get a functionality like: - update the expires if there is a record with same contact - otherwise remove all existing contact and add a new one
Perhaps would be a bit better than unregister()/save() sequence, but i see usages for unregister() function alone as well, and it is a small piece of code.
Could you please test and see if works ok for you, I had limited time for testing it, but I saw big discussion around this features and the effort to develop unregister() was low. Thanks you!
Cheers, Daniel
On 09/29/08 10:48, Ali Jawad wrote:
Hi
The solution below does work in deed the only problem is that if I use it and I am logged in at work and I want to use the service at home it wont let me.
What I am trying to achieve is that the same user can not be online with two sip phones at any one time. Is there a way to force a logout a user at Location A, when a user at Location B logs in.
With Regards
Ali Jawad
System Administrator
Splendor Telecom (www.splendor.net)
Beirut, Lebanon
Phone: +961 1 373725
Fax: + 961 1 375554
*From:* Gustavo Mistrinelli [mailto:gmistrinelli@gmail.com] *Sent:* 2008-09-26 18:16 *To:* Ali Jawad *Cc:* users@lists.kamailio.org; users@lists.openser.org *Subject:* Re: [Kamailio-Users] How to prevent - Same username used on multiple sip phones
Hi Ali, I don't know what you really are looking for but you can limit registration of the same user using max_contacts parameter. Setting it to 1, only the last registration will be active.
modparam("registrar", "max_contacts", 1)
You may experiment problems if the user put 2 devices trying to register at the same time.
Regards,
Gustavo
On Fri, Sep 26, 2008 at 8:32 AM, Ali Jawad <ali.jawad@splendor.net mailto:ali.jawad@splendor.net> wrote:
Hi
On my openser I can logon with the same username on two different softphones. How can I prevent the same username from being used on multiple devices.
With Regards
Users mailing list Users@lists.kamailio.org mailto:Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
-- Gustavo Mistrinelli
-- This message has been scanned for viruses and dangerous content by *MailScanner* http://www.mailscanner.info/, and is believed to be clean.
Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users