[SR-Users] 2 rollover contacts per user

Daniel-Constantin Mierla miconda at gmail.com
Sat Mar 24 09:48:54 CET 2012


Hello,

On 3/23/12 3:21 PM, Krishna Kurapati wrote:
> Hi,
>
> Is there a way to set up maximum of 2 active roll over contacts per 
> user? Currently when I setup max contacts param as 2,
> The third one is responding with 503 error for 3rd Register. How can 
> we remove one of the contacts and replace it with the
> new one.
>
> I need it when the device is switching over from Wifi to 3G and back. 
> or Wifi network to Wifi network switching.
the master branch support setting number of contacts per registration, 
but it is the old fashion of rejecting new contacts.

Some ideas coming in my mind, not sure if all get to a proper solution:
- play with two tables for usrloc, like location1 and location2, each 
with save(...) last registration and you do round robing with the 
registration (use htable to keep which location table to use next). Then 
do lookup/append_branch over the table one, revert the uri and do lookup 
over the second table -- combine these operations as you need
- use database mode only and then sqlops to remove entries that are no 
longer useful for you. defining location table in memory (possible with 
mysql), gives you good performances

Of course, an extension to c code to have such functionality would be 
another option, contributions will be accepted as usual.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/




More information about the sr-users mailing list