[Kamailio-Users] How to prevent - Same username used on multiple sip phones
Jan Janak
jan at iptel.org
Tue Sep 30 11:59:51 CEST 2008
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.
More information about the Users
mailing list