<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hello Team<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I am implementing a Surrogate SBC on OpenSIPs 3.4 and I have the following scenario <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>OpenSIPs will use registrant to register 5000+ user to a remote registrar.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If that remote registrar fails (connectivity or Registrar down), OpenSIPs will register all users to a Backup remote registrar.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Up to that point is implemented and working fine.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Now, in case Primary registrar is up again, OpenSIPs should switch over to Primary only when registration to Backup is expired or forced un-registered.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have only one solution on that which is not working well on large number or users. The solution is to select all registered users from db, and loop to un-register / register.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>My preferred solution would be a mi command reg_re-register all which will do the following steps async.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>reg_disable all (send de-registration for all users)<o:p></o:p></p><p class=MsoNormal>reg_reload (reload the new configuration from DB with the new registrar)<o:p></o:p></p><p class=MsoNormal>reg_enable all (force re-register all users)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have to mention that the switch over between registrars is done via SQL Update.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Finally, one finding which I have to cross check, is that if I change the registrar on DB and execute reg_reload, there is no REGISTRATION Request to the new registrar until initial registration is expired. Mi reg_list shows wrong that user is in state REGISTERED at the New registrar Server which is not.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Any other suggestion / help will be appreciated.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.0pt;margin-left:1.0pt;line-height:16.5pt'><b><span style='color:#5F5F5F'><o:p> </o:p></span></b></p><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.0pt;margin-left:1.0pt;line-height:16.5pt'><b><span style='color:#5F5F5F'>Antonis Psaras </span></b><span style='color:#595959'><o:p></o:p></span></p></div></body></html>