<div dir="ltr">I use something different. I defined a profile with value:<div><br></div><div>modparam(&quot;dialog&quot;, &quot;profiles_with_value&quot;, &quot;customercps&quot;);</div><div><br></div><div>Then use this profile in a counter with customer_id + current timestamp:</div><div><br></div><div>set_dlg_profile(&quot;customercps&quot;, &quot;$avp(customer_id)$Ts&quot;);</div><div><br></div><div>This way I can count current calls on current second and limit CPS per customer. </div><div><br></div><div>The idea is the same, you can define your period and do something like this.</div><div><br></div><div>Regards<br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 1, 2016 at 9:48 AM, Sasmita Panda <span dir="ltr">&lt;<a href="mailto:spanda@3clogic.com" target="_blank">spanda@3clogic.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you so much . This may help me . </div><div class="gmail_extra"><span class=""><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><b><i>Thanks &amp; Regards</i></b><div><i>Sasmita Panda</i></div><div><i>Network Testing and Software Engineer</i></div><div><i>3CLogic , ph:07827611765</i></div></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">On Mon, Aug 1, 2016 at 6:15 PM, Surabhi Garg <span dir="ltr">&lt;<a href="mailto:surabhi.garg@vvdntech.in" target="_blank">surabhi.garg@vvdntech.in</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Sasmita,<br><br></div>For this you can use Exported Pseudo Variable <b>&quot;$DLG_Count&quot;</b> of Dialog Module in your OpenSIPS configuration file.<br></div><b><br>Below is the sample snippet:<br><br></b><div style="margin-left:40px"><span style="color:rgb(0,0,255)"><i>if (!has_totag() &amp;&amp; is_method(&quot;INVITE&quot;)
<br>                        &amp;&amp; $DLG_count &gt; <span style="background-color:rgb(255,255,0)">&lt;max_threashold&gt;</span>) {
<br>                send_reply(&quot;503&quot;, &quot;Service Unavailable&quot;);
<br>                exit;<br>}<br><br></i></span></div>In above snippet, <b>max_threashold</b> you can replace with your desired limit.<br><div><div><br><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br></div><br clear="all"><b><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt"><span><p style="margin:0in;margin-bottom:.0001pt"><b>With Best
Regards,</b></p><p style="margin:0in 0in 0.0001pt"><b><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(89,89,89);background-image:initial;background-repeat:initial">Surabhi Garg<br></span></b></p><p style="margin:0in 0in 0.0001pt"><b><span style="font-size:11pt;font-family:Calibri,sans-serif;background-image:initial;background-repeat:initial"></span></b></p></span><p style="margin:0in;margin-bottom:.0001pt"><b>VVDN
Technologies Pvt Ltd</b><b style="font-family:arial,sans-serif;font-size:13px;color:rgb(34,34,34)"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt"></span></b></p><span><p style="margin:0in 0in 0.0001pt;display:inline!important"><b><span style="font-size:11pt;font-family:Calibri,sans-serif;background-image:initial;background-repeat:initial">Cell :<span> </span><a href="tel:%2B91%209910100290" value="+919910100290" target="_blank">+91 </a><a href="tel:8130321886" value="+558130321886" target="_blank">8130321886</a>|<span> </span>Skype :<span> </span>surabhi.garg9</span></b></p></span></span></b><p style="font-family:arial;font-size:small">








</p><br></div></div></div></div></div><div><div>
<br><div class="gmail_quote">On Mon, Aug 1, 2016 at 5:54 PM, Sasmita Panda <span dir="ltr">&lt;<a href="mailto:spanda@3clogic.com" target="_blank">spanda@3clogic.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am aware about the command . But I wanted to do something inside opensips script . <div><br></div><div>        My aim is to do something like this . I wanted to count the total number of active call and ll compare that with a fixed value, if will become greater than this then I may drop the next call by sending some error code . Is this possible any way with dialog module ?</div><div><br></div><div>      By the way , thanks for your quick reply .</div><div>      </div></div><div class="gmail_extra"><span><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><b><i>Thanks &amp; Regards</i></b><div><i>Sasmita Panda</i></div><div><i>Network Testing and Software Engineer</i></div><div><i>3CLogic , ph:07827611765</i></div></div></div></div>
<br></span><div><div><div class="gmail_quote">On Mon, Aug 1, 2016 at 5:48 PM, Surabhi Garg <span dir="ltr">&lt;<a href="mailto:surabhi.garg@vvdntech.in" target="_blank">surabhi.garg@vvdntech.in</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Sasmita,<br><br></div>OpenSIPS dialog module provide exported statistics which could give you &#39;Number of Current Active Dialogs&#39; (at the instant command is fired). <br><br></div><b>Below is the opensipsctl command to get active dialog statistics:<br></b><div style="margin-left:40px"><span style="background-color:rgb(255,255,0)">&lt;opensips_install_dir&gt;/opensipsctl fifo get_statistics active_dialogs
</span><br></div><div><br><div><div><div><div><div><div>In case you require active dialogs in a particular interval of time I would suggest that you could make either some script or some program which calculates the data fetched using above command. <br><br></div><div>For instance; will give you required statistics <br></div><div style="margin-left:40px">(active dialog at timestamp X) - (active dialog at timestamp Y); where X &gt; Y. <br><br></div>Hope that helps.<br></div><div><div><br></div></div></div></div></div></div></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br></div><br clear="all"><b><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt"><p style="margin:0in;margin-bottom:.0001pt"><b>With Best
Regards,</b></p><p style="margin:0in 0in 0.0001pt"><b><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(89,89,89);background-image:initial;background-repeat:initial">Surabhi Garg<br></span></b></p><p style="margin:0in 0in 0.0001pt"><b><span style="font-size:11pt;font-family:Calibri,sans-serif;background-image:initial;background-repeat:initial"></span></b></p><p style="margin:0in 0in 0.0001pt;display:inline!important"><b><span style="font-size:11pt;font-family:Calibri,sans-serif;background-image:initial;background-repeat:initial">Cell :<span> </span><a href="tel:%2B91%209910100290" value="+919910100290" target="_blank">+91 </a><a href="tel:8130321886" value="+558130321886" target="_blank">8130321886</a>|<span> </span>Skype :<span> </span>surabhi.garg9</span></b></p></span></b><p style="font-family:arial;font-size:small">








</p><br></div></div></div></div></div>
<br><div class="gmail_quote"><div><div>On Mon, Aug 1, 2016 at 5:15 PM, Sasmita Panda <span dir="ltr">&lt;<a href="mailto:spanda@3clogic.com" target="_blank">spanda@3clogic.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi All ,<div><br></div><div>        We are facing some network bandwidth when there is high load in the opensips server . And that time some of the calls getting dropped .</div><div><br></div><div>      Is there any module in opensips which  can give me the active call count in a perticualr interval of time and it may get updated automatically . So that I may set some alert when the load become maximum .</div><div><br></div><div>      If I can get the call count basing on a particular user agent then also I will be helpful . </div><div><br></div><div>     I have gone through &quot;<b>statistics module</b>&quot; . I am not sure but I think this is possible using this module . If there is any other way then let me know .</div><div><br></div><div>      Thanks in advance for any type of help .</div><div><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><b><i>Thanks &amp; Regards</i></b><span><font color="#888888"><div><i>Sasmita Panda</i></div><div><i>Network Testing and Software Engineer</i></div><div><i>3CLogic , ph:07827611765</i></div></font></span></div></div></div>
</div></div>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>