<html><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;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EstiloCorreo19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang="ES-CL" link="#0563C1" vlink="#954F72" style="word-wrap:break-word"><div class="WordSection1"><p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Mark.</span></p><p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Do you still have the same problem?.</span></p><p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Did you manage to solve it?.</span></p><p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Ricardo.-</span></p><p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> </span></p><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="ES">De:</span></b><span lang="ES"> Users <<a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>> <b>En nombre de </b>Mark Allen<br><b>Enviado el:</b> miércoles, 3 de febrero de 2021 8:42<br><b>Para:</b> OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>><br><b>Asunto:</b> [OpenSIPS-Users] OpenSIPS 3.1 - Mid_Registrar AOR throttling & FreePBX/Asterisk Expiry problem</span></p></div><p class="MsoNormal"> </p><div><p class="MsoNormal"><span style="font-family:"Courier New"">I'm seeing strange behaviour using mid_registrar with AOR throttling...</span></p><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">On initial registration, I do a mid_registrar_save():</span></p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">        mid_registrar_save("location","mp0v","<a href="sip:$tU@midreg">sip:$tU@midreg</a>",,"vipx");</span></p><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">Return value from save is "1" (success) and then I successfully forward the REGISTER to the FreePBX/Asterisk main registrar (so far so good!).</span></p></div></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">Asterisk returns a "200 OK" to OpenSIPS which has the registration expiry value set in both the "Expires" header and in the "Contact" header...</span></p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Courier New"">        SIP/2.0 200 OK<br>        Expires: 600<br>        Contact: <<a href="sip:xxxx%40midreg@xxx.xxx.xxx.xxx:5060">sip:xxxx%40midreg@xxx.xxx.xxx.xxx:5060</a>>;expires=600</span></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">Mid_Registrar forwards this on to the UAC after modifying the expiry value for AOR throttling, but only the "expires" setting in the "Contact" header gets modified...</span></p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">        SIP/2.0 200 OK<br>        Expires: 600<br>        Contact: <<a href="sip:350203@192.168.50.7:50614;ob">sip:350203@192.168.50.7:50614;ob</a>>;expires=300</span></p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">This leads to the unpredictable behaviour I'm seeing. MicoSIP seems to prefer to use the "Contact" header expiry value, and so works fine, however, Blink and a test MizuTech softphone seem to prefer the "Expires" header value, and so are not using the AOR throttling value. </span></p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">In the above example, Mid_Registrar is expecting the UAC to REGISTER again before 300 seconds have elapsed to maintain the registration, but Blink or the MizuTech softphone believe they should renew their registration before 600 seconds. When Mid_Registrar does not get the expected registration at around 300 seconds it assumes the connection is lost and de-registers on Asterisk. Finally, the UAC renews the registration at around 600 seconds meaning the UAC is effectively cycling between being available/unavailable.</span></p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">I have written a workaround in our config file to remove the invalid value before the "200 OK" gets forwarded to the UAC, but should mid_registrar be changing the expiry value in both places?</span></p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"> </p></div></div></div></body></html>