[OpenSIPS-Users] lookup "b" flag - one registration at a time

Jeff Pyle jpyle at fidelityvoice.com
Mon Jan 18 15:48:20 CET 2010


The "f" flag sounds fantastic.  Thanks.


- Jeff


On Jan 18, 2010, at 9:24 AM, Bogdan-Andrei Iancu wrote:

> Hi Jeff,
> 
> Jeff Pyle wrote:
>> Iñaki,
>> 
>> On Jan 9, 2010, at 5:00 PM, Iñaki Baz Castillo wrote:
>> 
>> 
>>> El Sábado, 9 de Enero de 2010, Jeff Pyle escribió:
>>> 
>>>> Hello,
>>>> 
>>>> The docs say that when using the "b" flag with lookup() when multiple
>>>> records are present, it will load only the one with the highest q.  What
>>>> if the q is the same for all?  How does it decide which to use?
>>>> 
>>> I've not tested it with multiple users sharing same "q". however it should 
>>> fetch all the users with highest "q", not just one of them.
>>> 
>> 
>> Perhaps I'm asking the wrong question.  I'm looking to allow only one registration per user in the sense that if a second successful registration comes in it will replace tne existing one.  My approach so far is to use a max_contacts=2 and the lookup() function with the "b" flag to retrieve only one. 
> maybe without the "b" flag as the "b" flag will return you all the 
> registered contacts.
>> max_contacts=1 returns a 503 to the new "replacement" registration request, so that's out.
>> 
>> Perhaps the hot ticket is to run an all-DB mode running a manual mysql query with avp_db_query after successful REGISTER authentication but before the save() so we can remove any existing registrations before the new one is saved.  Thoughts?
>> 
> No way - the SIP contact matching is much to complicated to do it at DB 
> level.
> 
> 
> As I found that kind of behaviour was more and more asked by people, I 
> will add a new flag "f" to force at save() time the override of the 
> existing contacts if the max_contacts() was exceeded.
> 
> Regards,
> Bogdan
>> 
>> - Jeff
>> 
>> 
>> 
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
>> 
> 
> 
> -- 
> Bogdan-Andrei Iancu
> www.voice-system.ro
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Regards,
--------
Jeff Pyle
Director, Voice Engineering
Fidelity Voice & Data | 23250 Chagrin Blvd, Suite 250 | Beachwood, Ohio 44122
P: 216-245-4106
F: 216-595-0706
E: jpyle at fidelityvoice.com

Visit us at http://www.fidelityvoice.com

2008 & 2009 Inductee to the prestigious Weatherhead 100

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.jpg
Type: image/jpeg
Size: 6468 bytes
Desc: image.jpg
Url : http://lists.opensips.org/pipermail/users/attachments/20100118/f3704efb/attachment.jpg 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
Url: http://lists.opensips.org/pipermail/users/attachments/20100118/f3704efb/attachment.txt 


More information about the Users mailing list