[OpenSIPS-Users] [Kamailio-Users] How to prevent - Same username used on multiple sip phones

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Oct 9 10:21:54 CEST 2008


Hi Ali,

As said, there is no way for a SIP proxy to unregistered an already 
registered device - the best it can do is to simply ignore the 
registration and not to use it. You can do this by limiting the number 
of branches to be used at lookup() time (see append_branches 
http://www.opensips.org/html/docs/modules/devel/registrar.html#id2506607) 
and then to apply some ordering between the registered branches in order 
to get first the one you want.
There are two possible ways to order to contacts per AOR:
    1) based on q value (this is by default) - the devices can have 
different q (priorities)
    2) time based ( see desc_time_order param 
http://www.opensips.org/html/docs/modules/devel/usrloc.html#id2533689) - 
the last register phone will be the first used - but note that you have 
re-registration, so the devices will continuously register, so you 
cannot say which is the last to register - they will keep alternating.

Regards,
Bogdan


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 at gmail.com]
> *Sent:* 2008-09-26 18:16
> *To:* Ali Jawad
> *Cc:* users at lists.kamailio.org; users at 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 at splendor.net 
> <mailto:ali.jawad at 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 at lists.kamailio.org <mailto:Users at 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 at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list