<div>Hi All</div>
<div>Still I am struggling to find a solution how to control the number of calls.</div>
<div> </div>
<div>I have few more doubts regarding this.</div>
<div> </div>
<div>1. Do I need to enable mysql , so that these counters such as $DLG_count will be updated properly. Now I am getting 0 always irrespective of number of calls in system.</div>
<div> </div>
<div>2. For testing purpose, I wanted to set max calls at any point of time should not be more than 1.</div>
<div>So I had the check as below </div>
<div> </div>
<div><strong>if($DLG_count > 1) </strong></div>
<div> </div>
<div>I read in some previous posts where someone was mentioning the check as</div>
<div> </div>
<div><strong>if ( avp_check("$DLG_count", "gt/i:10") ) <br></strong><br></div>
<div>Please let me know which one is correct.</div>
<div> </div>
<div> </div>
<div>3. How do I debug whats going wrong. Why $DBG_count is not updated.</div>
<div> </div>
<div>Thanks in advance.</div>
<div> </div>
<div>Regards,</div>
<div>Austin</div>
<div> </div>
<div> </div>
<div> </div>
<div class="gmail_quote">On Sat, Oct 29, 2011 at 2:40 PM, Austin Einter <span dir="ltr"><<a href="mailto:austin.einter@gmail.com">austin.einter@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Alex</div>
<div>Initially I did not put dlg_manage(), after reading your post I added the dlg_manage(). Now in route section my code in kamailio.config looks as below.</div>
<div> </div>
<div> </div>
<div><strong> dlg_manage();<br> if (is_method("INVITE"))<br> {<br> if (!has_totag())
<div class="im"><br> {<br> if($DLG_count > 1)<br> {<br> sl_send_reply("503","RESOURCE UNAVAILABLE");<br> exit;<br>
}<br> else<br> {<br></div> setflag(FLD_DLG);
<div class="im"><br> xlog("Dialog count = $DLG_count\n");<br> }<br> }<br></div></strong><br>The end result still remains same. The DLG_count still shows as 0 irrespective of number of calls present in system.</div>
<div> </div>
<div>Can somebody points whats wrong I am doing here.</div>
<div> </div>
<div>Regards,</div>
<div>Austin</div>
<div>
<div></div>
<div class="h5">
<div> </div>
<div> </div>
<div> </div>
<div><br> </div>
<div class="gmail_quote">On Sat, Oct 29, 2011 at 8:58 AM, Alex Balashov <span dir="ltr"><<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Are you calling dlg_manage() when processing the initial INVITE request?<br><br>--<br>This message was painstakingly thumbed out on my mobile, so apologies for brevity, errors, and general sloppiness.<br>
<br>Alex Balashov - Principal<br>Evariste Systems LLC<br>260 Peachtree Street NW<br>Suite 2200<br>Atlanta, GA 30303<br>Tel: +1-678-954-0670<br>Fax: +1-404-961-1892<br>Web: <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
<div>
<div></div>
<div><br>On Oct 28, 2011, at 8:57 PM, Austin Einter <<a href="mailto:austin.einter@gmail.com" target="_blank">austin.einter@gmail.com</a>> wrote:<br><br>> This is continuation with limiting number of calls per Kamailio proxy server.<br>
> I modified kamailio.cfg as below.<br>><br>> 1. loadmodule "dialog.so"<br>> 2. modparam("dialog", "enable_stats", 1)<br>> 3. modparam("dialog", "dlg_flag", 4)<br>
> Next, as dialog module I can use either active_dialogs() or $DLG_count to find number of calls present at any given point of time.<br>> However if I use active_dialogs() I get parse error when I run kamailio proxy.<br>
> Next I used $DLG_count , but always I am getting value of $DLG_count as 0.<br>><br>> In route section, I added code as below.<br>><br>> if (is_method("INVITE"))<br>> {<br>> if($DLG_count > 1)<br>
> {<br>> sl_send_reply("503","RESOURCE UNAVAILABLE");<br>> exit;<br>> }<br>> else<br>> {<br>
> xlog("Dialog count = $DLG_count\n");<br>> }<br>> }<br>> Everytime a new call starts , it prints $DLG_count as 0.<br>><br>> Kindly let me know whats going wrong here.<br>
><br>> Regards<br>> Austin<br>><br>><br></div></div>> _______________________________________________<br>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>> <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br></div></div></blockquote></div><br>