<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.E-MailFormatvorlage18
{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 70.85pt 2.0cm 70.85pt;}
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="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Joel,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Thank you, I was reading it yesterday. See this issue
<a href="https://github.com/kamailio/kamailio/issues/2080#issue-499544483">https://github.com/kamailio/kamailio/issues/2080#issue-499544483</a> – in my tests the proxies will expire the dialogs even after a restart. I just tested it again even restarting both
proxies a few times.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">-- <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning Westerholt -
</span><span style="mso-fareast-language:EN-US"><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="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Kamailio services -
</span><span style="mso-fareast-language:EN-US"><a href="https://skalatan.de/services"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/services</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org>
<b>On Behalf Of </b>Joel Serrano<br>
<b>Sent:</b> Tuesday, October 1, 2019 4:35 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; miconda@gmail.com<br>
<b>Subject:</b> Re: [SR-Users] Call limit through shared database<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Found it: <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><a href="https://github.com/kamailio/kamailio/issues/1591#issuecomment-409205552">https://github.com/kamailio/kamailio/issues/1591#issuecomment-409205552</a><o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">On Tue, Oct 1, 2019 at 07:15 Joel Serrano <<a href="mailto:joel@textplus.com">joel@textplus.com</a>> wrote:<o:p></o:p></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="MsoNormal" style="margin-left:35.4pt">Just a note, I would suggest to use htable+dmq to do such limits, dialog+dmq has some issues when handling dialog expiration when a node for whatever reason is restarted.. (search GH issues and you will find
one with a long thread where Charles explains the reasons: TL;DR: You could end up having inconsistent dialog information with dialog+dmq)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hope it helps! <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Joel. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">On Tue, Oct 1, 2019 at 01:02 Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
</div>
<div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><br>
On 30.09.19 14:55, Daniel Tryba wrote:<br>
> On Sun, Sep 29, 2019 at 11:03:47AM +0300, Olli Attila wrote:<br>
>> modparam("dialog", "profiles_with_value", "concurrent_calls")<br>
>> modparam("dialog", "dlg_flag", 4)<br>
>> modparam("dialog", "db_url", DBURL)<br>
>> modparam("dialog", "db_mode", 1)<br>
> <br>
> Have you tested with a lower value of<br>
> <a href="https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dialog.p.update_period" target="_blank">
https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dialog.p.update_period</a><br>
<br>
<br>
The update_period should have no impact when db_mode=1 -- in this case<br>
the records are written to database immediately. I think update_period<br>
is intended only for db_mode=2.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
> I have it set to 5, but for some reason I'm not using get_profile_size<br>
><br>
> For inbound:<br>
> $var(maxchannels) = 0;<br>
> sql_xquery("ca", "select count(id) as c from dialog where xdata like '%maxchannels%$rU%' and timeout>unix_timestamp()", "ra");<br>
> $var(maxchannels)=$xavp(ra=>c);<br>
> sql_result_free("ra");<br>
><br>
> For outbound:<br>
> sql_xquery("ca", "select count(id) as c from dialog where xdata like '%maxchannels%$au%' and timeout>unix_timestamp()", "ra");<br>
> $var(maxchannels)=$xavp(ra=>c);<br>
> sql_result_free("ra");<br>
><br>
> Pasting the code here I see this isn't that secure since a user foo also<br>
> gets the number of calls for foobar counted against him! Off to put a "<br>
> before/after the username.<br>
> <br>
><br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
-- <br>
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a><br>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> --
<a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- <a href="https://asipto.com/u/kat" target="_blank">
https://asipto.com/u/kat</a><br>
<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>