<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Sergiu,<br></div><div><br></div><div>You can use the flags on the save() function from the registrar module<br></div><div><a href="https://www.kamailio.org/docs/modules/5.1.x/modules/registrar.html#registrar.f.save">https://www.kamailio.org/docs/modules/5.1.x/modules/registrar.html#registrar.f.save</a><br></div><div><br></div><li class="listitem"><p><span class="emphasis"><i>0x04</i></span> - store and maintain one
                                        contact per AoR. If there are other contact addresses for
                                        AoR not matching current registration, remove them.
                                        This mode ensures one contact per AoR (user).<br></p></li><div><br></div><div>On Tue, 16 Apr 2019, at 7:33 AM, Sergiu Pojoga wrote:<br></div><blockquote type="cite" id="qt"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi ppl,<br></div><div><br></div><div>Say we want to allow 1 contact per AOR.<br></div><div>modparam("registrar", "max_contacts", 1)<br></div><div><br></div><div>Say some UA looses connection before de-registering, then comes back shortly after (before Contact expires) and tries to register with a different Contact, but gets rejected with error "test_max_contacts(): too many contacts for AOR".<br></div><div><br></div><div>What's the approach to handle this situation? I'd like the registrar to accept and save that AoR based on the latest registration. Similar to how Asterisk's single-contact stack `chan_sip` works - whoever was the latest to register successfully gets to be the winner.<br></div><div><br></div><div>Thanks,<br></div><div>--Sergiu<br></div></div></div></div><div>_______________________________________________<br></div><div>Kamailio (SER) - Users Mailing List<br></div><div>sr-users@lists.kamailio.org<br></div><div>https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<br></div><div><br></div></blockquote><div><br></div></body></html>