<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())<br> {<br> if($DLG_count > 1)<br> {<br> sl_send_reply("503","RESOURCE UNAVAILABLE");<br>
exit;<br> }<br> else<br> {<br> setflag(FLD_DLG);<br> xlog("Dialog count = $DLG_count\n");<br> }<br>
}<br></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>
<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">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 class="h5"><br>On Oct 28, 2011, at 8:57 PM, Austin Einter <<a href="mailto:austin.einter@gmail.com">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">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">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>