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
When the user logon
Insert in the db his IP
Cordialement
BERGANZ François
http://www.acropolistelecom.net/ http://www.acropolistelecom.net
De : users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] De la part de Ali Jawad Envoyé : vendredi 26 septembre 2008 13:32 À : users@lists.kamailio.org; users@lists.openser.org Objet : [Kamailio-Users] How to prevent - Same username used on multiple sip phones
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
Yeah and ?
________________________________
From: BERGANZ François [mailto:francois@acropolistelecom.net] Sent: 2008-09-26 15:06 To: Ali Jawad; users@lists.kamailio.org; users@lists.openser.org Subject: RE: [Kamailio-Users] How to prevent - Same username used on multiple sip phones
When the user logon
Insert in the db his IP
Cordialement
BERGANZ François
http://www.acropolistelecom.net http://www.acropolistelecom.net/
De : users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] De la part de Ali Jawad Envoyé : vendredi 26 septembre 2008 13:32 À : users@lists.kamailio.org; users@lists.openser.org Objet : [Kamailio-Users] How to prevent - Same username used on multiple sip phones
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
I dont really know !
I imagin that when you logon a user, check the IP in the db
Cordialement
BERGANZ François
http://www.acropolistelecom.net/ http://www.acropolistelecom.net
De : Ali Jawad [mailto:ali.jawad@splendor.net] Envoyé : vendredi 26 septembre 2008 14:08 À : BERGANZ François; users@lists.kamailio.org; users@lists.openser.org Objet : RE: [Kamailio-Users] How to prevent - Same username used on multiple sip phones
Yeah and ?
_____
From: BERGANZ François [mailto:francois@acropolistelecom.net] Sent: 2008-09-26 15:06 To: Ali Jawad; users@lists.kamailio.org; users@lists.openser.org Subject: RE: [Kamailio-Users] How to prevent - Same username used on multiple sip phones
When the user logon
Insert in the db his IP
Cordialement
BERGANZ François
http://www.acropolistelecom.net/ http://www.acropolistelecom.net
De : users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] De la part de Ali Jawad Envoyé : vendredi 26 septembre 2008 13:32 À : users@lists.kamailio.org; users@lists.openser.org Objet : [Kamailio-Users] How to prevent - Same username used on multiple sip phones
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
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 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 http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
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 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 http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
Hello,
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.
if I understand it right, you want to keep only most recent registration. It is not possible to force unregister for a user, SIP does not provide a way to notify a device that it should stop registrations or to unregister at that moment. If you have A and B registering, you can direct the traffic to last registered tunning the registrar/usrloc modules parameters:
modparam("registrar", "append_branches", 0) modparam("usrloc", "desc_time_order", 1)
See the readme's at:
http://www.kamailio.org/docs/modules/1.4.x/
You may end up in strange situation, let's say both phone use 30min expires registration, but they are interlaced 15min. You will have A available for 15 min, then B sends register and will be for 15 min, then again A a.s.o.
Cheers, Daniel
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
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
Hello,
moreover, the save() function can take now flag 0x04 in the second parameter to store and maintain only one contact per user: http://www.kamailio.org/docs/modules/devel/registrar.html#id2506197
If you can test and report the results would be great.
Cheers, Daniel
On 09/29/08 16:31, Daniel-Constantin Mierla wrote:
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
Hello,
On 29-09 16:31, Daniel-Constantin Mierla wrote:
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
I wonder if this is safe to use. Given that you cannot notify the already-registered user agent that its contact is being removed, it will appear as if it is still registered and able to receive calls. And after next re-registration attempt, it will again steal the registration from the most recently registered phone, so neither of the two phones will be reachable all the time.
If you want to handle this in a graceful manner and have only one phone registered then you should probably reject registration attempts from other phones as long as the first one is registered, instead of discarding the old contact silently.
And for the scenario mentined earlier (calls being sent to a home phone if it is registered), you could configure the home phone with a higher q value and do serial forking based on the q value.
Jan.
Hello Jan,
On 09/30/08 12:59, Jan Janak wrote:
Hello,
On 29-09 16:31, Daniel-Constantin Mierla wrote:
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
I wonder if this is safe to use. Given that you cannot notify the already-registered user agent that its contact is being removed, it will appear as if it is still registered and able to receive calls. And after next re-registration attempt, it will again steal the registration from the most recently registered phone, so neither of the two phones will be reachable all the time.
If you want to handle this in a graceful manner and have only one phone registered then you should probably reject registration attempts from other phones as long as the first one is registered, instead of discarding the old contact silently.
And for the scenario mentined earlier (calls being sent to a home phone if it is registered), you could configure the home phone with a higher q value and do serial forking based on the q value.
The scenario was presented before, where each phone will steal the registration periodically. You are right, that cannot be prevented. One usage case I found in the past for this case was to deal with some broken NAT/STUN devices, when you are sure there is a single phone, but each registration gets with a new port for each register refresh.
The goal is to get a single contact in location, as fair as possible. I am in the process to develop access to contact record attributes (we had a discussion in the past with subject "RFC: branches/location records control"), so you can check the q value (or other attributes) and decide from script to reject or save as only contact.
Another usage case for this function is to keep in user profile (managed by some web/gui) a mapping between source IP and time frame: work_ip -- allow register 9:00 to 18:00 home_ip -- allow for the rest of the time
Cheers, Daniel
On Tuesday 30 September 2008, Daniel-Constantin Mierla wrote:
to deal with some broken NAT/STUN devices, when you are sure there is a single phone, but each registration gets with a new port for each register refresh.
How usefull is this? How do you get packets from the outside through the NAT if the NAT is losing its mappings?
Alex.
Hello,
On 09/30/08 16:10, Alex Hermann wrote:
On Tuesday 30 September 2008, Daniel-Constantin Mierla wrote:
to deal with some broken NAT/STUN devices, when you are sure there is a single phone, but each registration gets with a new port for each register refresh.
How usefull is this? How do you get packets from the outside through the NAT if the NAT is losing its mappings
the nat might not lose the mappings. Let me give an example where i encountered a real need for this. Some time ago mobile phones starting introducing sip phone applications to connect via wifi. It happened many time that they crash and upon reboot they asked a new stun and got new binding port, while the old contact was still valid. If registration time is long enough could happen to have several contacts in location table but only one valid. kamailio/openser was forking, of course the right branch was answered, still, extra resources were used.
Cheers, Daniel