<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
Thanks and how can I control that timer after enabling the contact ?</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<br>
</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
Regarding the dbase flag I don't see the current values saved there , it's only shown when dumping.</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Henning Westerholt <hw@gilawa.com><br>
<b>Sent:</b> Thursday, April 14, 2022 10:50:15 AM<br>
<b>To:</b> Ahmed Fouad <afouad@gmail.com><br>
<b>Cc:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><br>
<b>Subject:</b> RE: [SR-Users] UAC parameter for enabling and disabling remote registration</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
        {color:blue;
        text-decoration:underline}
span.x_E-MailFormatvorlage18
        {font-family:"Calibri",sans-serif;
        color:windowtext}
.x_MsoChpDefault
        {font-family:"Calibri",sans-serif}
@page WordSection1
        {margin:70.85pt 70.85pt 2.0cm 70.85pt}
div.x_WordSection1
        {}
-->
</style>
<div lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="">Hello,</span></p>
<p class="x_MsoNormal"><span style=""> </span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style="">if you do the reg enable and it shows also enabled in the flags, there should be (maybe after a timer run period) a new REGISTER send out.</span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style=""> </span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style="">Regarding your request, I would try to add the DB records with “disabled” flag in the database, and then using the uac_reg_enable/_disable function in the cfg file.</span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style=""> </span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style="">Cheers,</span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style=""> </span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style="">Henning</span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style=""> </span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style="">-- </span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style="">Henning Westerholt – </span><span style=""><a href="https://skalatan.de/blog/"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></span><span lang="EN-GB" style=""></span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style="">Kamailio services – </span><span style=""><a href="https://gilawa.com/"><span lang="EN-GB" style="color:#0563C1">https://gilawa.com</span></a></span><span lang="EN-GB" style=""></span></p>
<p class="x_MsoNormal"><span lang="EN-GB" style=""> </span></p>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="x_MsoNormal" style="margin-left:35.4pt"><b>From:</b> Ahmed Fouad <afouad@gmail.com>
<br>
<b>Sent:</b> Wednesday, April 13, 2022 9:15 PM<br>
<b>To:</b> Henning Westerholt <hw@gilawa.com><br>
<b>Cc:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><br>
<b>Subject:</b> Re: [SR-Users] UAC parameter for enabling and disabling remote registration</p>
</div>
<p class="x_MsoNormal" style="margin-left:35.4pt"> </p>
<div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">Hi,</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">I did many tests with some combinations and I'm afraid I've a problem here with registration after being disabled</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">1 - Having modparam("uac", "reg_active", 0)</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">Completely disable the remote registration and can't be overridden any other options trying to enable single registration from the code or from kamcmd.</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt"> </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">2 - Having modparam("uac", "reg_active", 1)</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">Remote registration is automatic and sent when kamailio is restarted and all expiration is being handled perfectly.</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">thus dumping reg_dump the flags = 20 ( 16 (2^4) - registration initialized  + 4 (2^2) - registration succeeded )</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt"> </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">I tried to disable this registration using kamcmd uac.reg_disable l_username XXXXX and it's disabled and confirmed flags: 21 (+ 1 (2^0) - registration profile is disabled ))</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">but my problem here I didn't see unregister going with expiration = 0 to clear the registration from the remote pbx so I used kamcmd uac.reg_unregister l_username XXXXX and message went fine and extension was
 unregistered.</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">tried again to enable it back using kamcmd uac.reg_enable l_username XXXXXX I see the flags goes to 16 only and no register message is being sent and it's stale like this even by running kamcmd uac.reg_reload</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt"> </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">My request is simply I've some entries in the uacreg table. I'd like to start kamailio without remote registration being enabled and have the ability to enable/disable the REGISTER messages from the configuration
 file.</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt"> </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">Can you please advise how to accomplish such scenario ?</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt"> </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt"> </p>
</div>
</div>
<p class="x_MsoNormal" style="margin-left:35.4pt"> </p>
<div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">On Wed, Apr 13, 2022 at 11:03 AM Henning Westerholt <<a href="mailto:hw@gilawa.com">hw@gilawa.com</a>> wrote:</p>
</div>
<blockquote style="border:none; border-left:solid #CCCCCC 1.0pt; padding:0cm 0cm 0cm 6.0pt; margin-left:4.8pt; margin-right:0cm">
<div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">Hello,</p>
<p class="x_MsoNormal" style="margin-left:35.4pt"> </p>
<p class="x_MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB">don’t know without looking to the code, I’d say just give it a try and see if it works.</span></p>
<p class="x_MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB"> </span></p>
<p class="x_MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB">Cheers,</span></p>
<p class="x_MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB"> </span></p>
<p class="x_MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB">Henning</span></p>
<p class="x_MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB"> </span></p>
<p class="x_MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB">-- </span></p>
<p class="x_MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB">Henning Westerholt –
</span><a href="https://skalatan.de/blog/" target="_blank"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></p>
<p class="x_MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB">Kamailio services –
</span><a href="https://gilawa.com/" target="_blank"><span lang="EN-GB" style="color:#0563C1">https://gilawa.com</span></a></p>
<p class="x_MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB"> </span></p>
<div style="border:none; border-top:solid windowtext 1.0pt; padding:3.0pt 0cm 0cm 0cm; border-color:currentcolor currentcolor">
<p class="x_MsoNormal" style="margin-left:70.8pt"><b>From:</b> Ahmed Fouad <<a href="mailto:afouad@gmail.com" target="_blank">afouad@gmail.com</a>>
<br>
<b>Sent:</b> Wednesday, April 13, 2022 4:42 PM<br>
<b>To:</b> Henning Westerholt <<a href="mailto:hw@gilawa.com" target="_blank">hw@gilawa.com</a>><br>
<b>Cc:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> Re: [SR-Users] UAC parameter for enabling and disabling remote registration</p>
</div>
<p class="x_MsoNormal" style="margin-left:70.8pt"> </p>
<div>
<div>
<p class="x_MsoNormal" style="margin-left:70.8pt">Hi,</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:70.8pt"> </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:70.8pt">I've tested this parameter and it's working as expected but I've a question here. When I start kamailio with disabled remote registration mode then from the configuration I use uac_reg_request_to(user, mode)
 to register only a single extension.</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:70.8pt">Will this scenario work ? </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:70.8pt">or the whole remote registration is disabled and needs to be enabled first ?</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:70.8pt"> </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:70.8pt">My goal is to send single registrations only from the code logic, not when kamailio starts.</p>
</div>
</div>
<p class="x_MsoNormal" style="margin-left:70.8pt"> </p>
<div>
<div>
<p class="x_MsoNormal" style="margin-left:70.8pt">On Wed, Apr 13, 2022 at 10:16 AM Henning Westerholt <<a href="mailto:hw@gilawa.com" target="_blank">hw@gilawa.com</a>> wrote:</p>
</div>
<blockquote style="border:none; border-left:solid windowtext 1.0pt; padding:0cm 0cm 0cm 6.0pt; margin-left:4.8pt; margin-top:5.0pt; margin-right:0cm; margin-bottom:5.0pt; border-color:currentcolor currentcolor currentcolor rgb(204,204,204)">
<div>
<div>
<p class="x_MsoNormal" style="margin-left:70.8pt">Hello,</p>
<p class="x_MsoNormal" style="margin-left:70.8pt"> </p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB">it is present e.g. in 5.5.x, also available in docs:
<a href="https://kamailio.org/docs/modules/5.5.x/modules/uac.html#uac.p.reg_active" target="_blank">
https://kamailio.org/docs/modules/5.5.x/modules/uac.html#uac.p.reg_active</a></span></p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB"> </span></p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB">Why do you think it was not merged?</span></p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB"> </span></p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB">Cheers,</span></p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB"> </span></p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB">Henning</span></p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB"> </span></p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB">-- </span></p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB">Henning Westerholt –
</span><a href="https://skalatan.de/blog/" target="_blank"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB">Kamailio services –
</span><a href="https://gilawa.com/" target="_blank"><span lang="EN-GB" style="color:#0563C1">https://gilawa.com</span></a></p>
<p class="x_MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB"> </span></p>
<div style="border:none; border-top:solid windowtext 1.0pt; padding:3.0pt 0cm 0cm 0cm; border-color:currentcolor">
<p class="x_MsoNormal" style="margin-left:106.2pt"><b>From:</b> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>>
<b>On Behalf Of </b>Ahmed Fouad<br>
<b>Sent:</b> Wednesday, April 13, 2022 4:11 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> [SR-Users] UAC parameter for enabling and disabling remote registration</p>
</div>
<p class="x_MsoNormal" style="margin-left:106.2pt"> </p>
<div>
<div>
<p class="x_MsoNormal" style="margin-left:106.2pt">Hi,</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:106.2pt"> </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:106.2pt">I was wondering if this patch was ever merged to the current release(s)</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:106.2pt"> </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:106.2pt"><a href="https://github.com/kamailio/kamailio/commit/49f354276df3cfc2cdb0f85b5a1839f86733aead?diff=split" target="_blank">https://github.com/kamailio/kamailio/commit/49f354276df3cfc2cdb0f85b5a1839f86733aead?diff=split</a></p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:106.2pt"> </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:106.2pt">I'd like to start Kamailio with all remote registration disabled then enable based on the code logic</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:106.2pt"> </p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:106.2pt">Thanks in advance,</p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="x_MsoNormal" style="margin-left:70.8pt"><br clear="all">
<br>
-- </p>
<div>
<div>
<p class="x_MsoNormal" style="margin-left:70.8pt">Best Regards,<br>
Ahmed Fouad</p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="x_MsoNormal" style="margin-left:35.4pt"><br clear="all">
<br>
-- </p>
<div>
<div>
<p class="x_MsoNormal" style="margin-left:35.4pt">Best Regards,<br>
Ahmed Fouad</p>
</div>
</div>
</div>
</div>
</body>
</html>