<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(&quot;INVITE&quot;))<br>        {<br>             if (!has_totag())<br>             {<br>                if($DLG_count &gt; 1)<br>                {<br>                        sl_send_reply(&quot;503&quot;,&quot;RESOURCE UNAVAILABLE&quot;);<br>
                        exit;<br>                }<br>                else<br>                {<br>                        setflag(FLD_DLG);<br>                        xlog(&quot;Dialog count = $DLG_count\n&quot;);<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">&lt;<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>&gt;</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 &lt;<a href="mailto:austin.einter@gmail.com">austin.einter@gmail.com</a>&gt; wrote:<br><br>&gt; This is continuation with limiting number of calls per Kamailio proxy server.<br>
&gt; I modified kamailio.cfg as below.<br>&gt;<br>&gt; 1. loadmodule &quot;dialog.so&quot;<br>&gt; 2. modparam(&quot;dialog&quot;, &quot;enable_stats&quot;, 1)<br>&gt; 3. modparam(&quot;dialog&quot;, &quot;dlg_flag&quot;, 4)<br>
&gt; 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>&gt; However if I use active_dialogs() I get parse error when I run kamailio proxy.<br>
&gt; Next I used $DLG_count , but always I am getting value of $DLG_count as 0.<br>&gt;<br>&gt; In route section, I added code as below.<br>&gt;<br>&gt;         if (is_method(&quot;INVITE&quot;))<br>&gt;         {<br>&gt;                 if($DLG_count &gt; 1)<br>
&gt;                 {<br>&gt;                         sl_send_reply(&quot;503&quot;,&quot;RESOURCE UNAVAILABLE&quot;);<br>&gt;                         exit;<br>&gt;                 }<br>&gt;                 else<br>&gt;                 {<br>
&gt;                         xlog(&quot;Dialog count = $DLG_count\n&quot;);<br>&gt;                 }<br>&gt;         }<br>&gt; Everytime a new call starts , it prints $DLG_count as 0.<br>&gt;<br>&gt; Kindly let me know whats going wrong here.<br>
&gt;<br>&gt; Regards<br>&gt; Austin<br>&gt;<br>&gt;<br></div></div>&gt; _______________________________________________<br>&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt; <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>