<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;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"Préformaté HTML Car";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";}
span.PrformatHTMLCar
{mso-style-name:"Préformaté HTML Car";
mso-style-priority:99;
mso-style-link:"Préformaté HTML";
font-family:"Courier New";}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@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="FR" link="#0563C1" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I just try to reproduce what we actually have on Oracle or what is done in opensips mid_registrar module and trust the A leg user as long as it come from the same IP/port couple that have successfully registered.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I paste the process description of the mechanism described on opensips module page.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">But I can understand your choice to not go that way.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US" style="font-size:13.5pt;mso-fareast-language:FR">Contact throttling<o:p></o:p></span></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="mso-fareast-language:FR">In "contact throttling" mode, the mid-registrar can significantly reduce the registration rate on the main registrar side (between
mid-registrar and main registrar), while coping with a high registration rate on the end-user side (between end-user and mid-registrar). This is useful in scenarios were the end-users are very dynamic and short-lived (like on mobile devices), but the main
registrar cannot cope with large traffic. <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="mso-fareast-language:FR">Traffic conversion is done in a
<i>"per-device"</i> manner, according to each unique SIP Contact header field value. It is achieved by increasing the "expires" parameter value of each contact, when relaying registrations to the main registrar. Once such a registration is completed, subsequent
registrations for the same SIP Contact header field value will be continuously absorbed by the mid-registrar until, eventually, the lifetime of the remote registration will have decreased enough that a refresh (i.e. simply forwarding the next REGISTER request)
is mandatory. <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="mso-fareast-language:FR">A common occurence is for some SIP User Agents to lose their network connection (especially when dealing with mobile devices),
hence they do not properly de-register from the mid-registrar. In this case, in order to avoid stale registrations on the main registrar (which contains SIP contacts with greatly extended lifetimes!), the mid-registrar will appropriately generate De-REGISTER
requests and remove these contacts from the main registrar's location service as soon as it considers them to have expired.
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="mso-fareast-language:FR">The main practical use for this mode is registration traffic conversion. By minimizing the strain of processing registrations
on the main registrar, we allow it to dedicate more system resources to critical areas of the platform, such as advanced SIP calling features and/or media handling.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://opensips.org/html/docs/modules/2.3.x/mid_registrar.html">https://opensips.org/html/docs/modules/2.3.x/mid_registrar.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:FR">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:FR">David<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:FR">From:</span></b><span lang="EN-US" style="mso-fareast-language:FR"> Daniel-Constantin Mierla <miconda@gmail.com>
<br>
<b>Sent:</b> Monday, October 12, 2020 3:20 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; David VILLAUME <david.villaume@sewan.fr><br>
<b>Subject:</b> Re: [SR-Users] Local cache registration<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">If you do not have access to credentials on Kamailio, how do you want to authenticate registrations coming every 5min? If you want to reuse the auth headers from the 1-hour based registration, then you create a big security problem, normally
nonce is valid very short time to avoid reply and offline brute force attacks.<o:p></o:p></span></p>
<p><span lang="EN-US">Note that Kamailio can connect to other databases+tables to fetch username and password, it doesn't have to be "subscriber" style. You can customize table name and column names. For example, it can connect to asterisk realtime database
to fetch the password from "secret" column.<o:p></o:p></span></p>
<p><span lang="EN-US">Cheers,<br>
Daniel<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">On 12.10.20 15:02, David VILLAUME wrote:<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><span lang="EN-US">I read again the uac doc and didn’t find a way to perform this using the functions that seems to require credentials that I don’t have on the kamailio host.<o:p></o:p></span></pre>
<pre><span lang="EN-US"> <o:p></o:p></span></pre>
<pre><span lang="EN-US">Is the uac module really designed to perform this operation is that way ?<o:p></o:p></span></pre>
<pre><span lang="EN-US"> <o:p></o:p></span></pre>
<pre><span lang="EN-US">Regards,<o:p></o:p></span></pre>
<pre><span lang="EN-US">David<o:p></o:p></span></pre>
<pre><span lang="EN-US"> <o:p></o:p></span></pre>
<pre><span lang="EN-US"> <o:p></o:p></span></pre>
<pre><span lang="EN-US"> <o:p></o:p></span></pre>
<pre><span lang="EN-US"> <o:p></o:p></span></pre>
<pre><span lang="EN-US">El Sun, 11 Oct 2020 20:07:58 +0000<o:p></o:p></span></pre>
<pre><span lang="EN-US">David VILLAUME <</span><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"><span lang="EN-US">david.villaume at sewan.fr</span></a><span lang="EN-US">> escribió:<o:p></o:p></span></pre>
<pre><span lang="EN-US"> <o:p></o:p></span></pre>
<pre><span lang="EN-US">><i> Hello,</i><o:p></o:p></span></pre>
<pre><span lang="EN-US">><i> </i><o:p></o:p></span></pre>
<pre><span lang="EN-US">><i> I try to perform a registration caching in order to have a short interval</i><o:p></o:p></span></pre>
<pre><span lang="EN-US">><i> registration on phone <> Kamailio (5 minutes) and a longest interval on the</i><o:p></o:p></span></pre>
<pre><span lang="EN-US">><i> leg Kamailio <> registrar(1h).</i><o:p></o:p></span></pre>
<pre><span lang="EN-US">><i> </i><o:p></o:p></span></pre>
<pre><span lang="EN-US">><i> I’m not so sure about the best way to proceed, does one of you have a working</i><o:p></o:p></span></pre>
<pre><span lang="EN-US">><i> sample or some hints about the way to have it working ?</i><o:p></o:p></span></pre>
<pre><span lang="EN-US">><i> </i><o:p></o:p></span></pre>
<pre><span lang="EN-US">><i> </i><o:p></o:p></span></pre>
<pre><span lang="EN-US"> <o:p></o:p></span></pre>
<pre><span lang="EN-US"> <o:p></o:p></span></pre>
<pre><span lang="EN-US">the uac module does that. You can handle upstream registrations in different<o:p></o:p></span></pre>
<pre><span lang="EN-US">intervals than the ones you receive.<o:p></o:p></span></pre>
<pre><span lang="EN-US"> <o:p></o:p></span></pre>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:FR"><br>
<br>
<o:p></o:p></span></p>
<pre><span lang="EN-US">_______________________________________________<o:p></o:p></span></pre>
<pre><span lang="EN-US">Kamailio (SER) - Users Mailing List<o:p></o:p></span></pre>
<pre><a href="mailto:sr-users@lists.kamailio.org"><span lang="EN-US">sr-users@lists.kamailio.org</span></a><span lang="EN-US"><o:p></o:p></span></pre>
<pre><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"><span lang="EN-US">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</span></a><span lang="EN-US"><o:p></o:p></span></pre>
</blockquote>
<pre><span lang="EN-US">-- <o:p></o:p></span></pre>
<pre><span lang="EN-US">Daniel-Constantin Mierla -- </span><a href="http://www.asipto.com"><span lang="EN-US">www.asipto.com</span></a><span lang="EN-US"><o:p></o:p></span></pre>
<pre><a href="http://www.twitter.com/miconda"><span lang="EN-US">www.twitter.com/miconda</span></a><span lang="EN-US"> -- </span><a href="http://www.linkedin.com/in/miconda"><span lang="EN-US">www.linkedin.com/in/miconda</span></a><span lang="EN-US"><o:p></o:p></span></pre>
<pre><span lang="EN-US">Funding: </span><a href="https://www.paypal.me/dcmierla"><span lang="EN-US">https://www.paypal.me/dcmierla</span></a><span lang="EN-US"><o:p></o:p></span></pre>
</div>
</body>
</html>