HI Jayesh, What you could do is to accept 2-3 registrations, but to actually use the last one only.
So set the mac_contacts to 2 or 3, the append_branches to 0 (to use only one contact) and in usrloc module set desc_time_order to 1 (http://www.opensips.org/html/docs/modules/1.5.x/usrloc.html#id266565) to sort contacts based on the registration time (first used will be the last registered) Regards, Bogdan Jayesh Nambiar wrote: > Hi All, > I had a requirement of allowing only one registration per user in a > particular scenario. I did not want to use the max_contacts parameter > of registrar module as it wont work right !!! The drawback was: > If device A had registered successfully and for some reason got > disconnected from the internet, the device won't unregister itself. > Opensips still has the record in the location table for that device, > now if the internet comes back and when the device tries to register > again, opensips will not allow since it already has the record in the > location. > The device will have to wait until the earlier registration expires in > the opensips. > The idea was to have a way of updating the location table if same user > is trying to REGISTER from same location or different location. > Meaning if user A is registered from location A and someone else using > same credentials of user A tries to register from location B, the > location table should only update the earlier record to location B and > not keep location A and location B both for user A. > > Is there a way to do this. Any help will be highly appreciiated. > > Thanks in advance. > > --- Jay > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
