<div>This is continuation with limiting number of calls per Kamailio proxy server.</div>
<div>I modified kamailio.cfg as below.</div>
<div> </div>
<div>1. loadmodule "dialog.so"</div>
<div>2. modparam("dialog", "enable_stats", 1)<br>3. modparam("dialog", "dlg_flag", 4)<br></div>
<div>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.</div>
<div>However if I use active_dialogs() I get parse error when I run kamailio proxy.</div>
<div>Next I used $DLG_count , but always I am getting value of $DLG_count as 0.</div>
<div> </div>
<div>In <strong>route</strong> section, I added code as below.</div>
<div> </div>
<div> 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></div>
<div>Everytime a new call starts , it prints $DLG_count as 0.</div>
<div> </div>
<div>Kindly let me know whats going wrong here.</div>
<div> </div>
<div>Regards</div>
<div>Austin</div>
<div> </div>
<div> </div>