<div>Thanks Andrew</div>
<div>I added profile_with_value module parameter and with that I am able to overcome this error.</div>
<div> </div>
<div>My code looks as below.</div>
<div> </div>
<div>        dlg_manage();<br>        if (is_method(&quot;INVITE&quot;)) {<br>                 if (!has_totag()) {<br>                        #$var(SIZE) = 0;<br>                        get_profile_size(&quot;caller&quot;, &quot;$fu&quot;, &quot;$var(SIZE)&quot;);<br>
                        xlog(&quot;Number of calls present now is  $var(SIZE)\n&quot;);<br>                        if( $var(SIZE) &gt; MAX_NUMBER_OF_CALLS ) {<br>                                sl_send_reply(&quot;503&quot;, &quot;Simultaneous calls limit reached&quot;);<br>
                                xlog(&quot;Rejected calls with 503 Simultaneous calls limit reached\n&quot;);<br>                                exit;<br>                        }<br>                        else {<br>                                 xlog(&quot;Allowed call. Looks max calls limit not reached. Calls= $var(SIZE)\n&quot;);<br>
                        }<br>                        set_dlg_profile(&quot;caller&quot;,&quot;$fu&quot;);<br>                }<br>        }<br></div>
<div>Whole purpose is to limit number of active calls at any point of time. $var(SIZE) gives the number of calls are being established, but not the number of calls are already established.</div>
<div> </div>
<div>So if I am making multiple calls at  a point of time, it is blocking call attempts beyond limit. But after all call setup complete, again $var(SIZE) becomes zero and allows new calls.</div>
<div> </div>
<div> </div>
<div>Has anybody done this (limiting number of calls at any point of time). If so can you please share the configuration file changes.</div>
<div> </div>
<div> </div>
<div>To get $var(SIZE) working properly, do I need to enable MySql, please advice.</div>
<div> </div>
<div>Regards</div>
<div>Austin</div>
<div><br><br> </div>
<div class="gmail_quote">On Sun, Oct 30, 2011 at 12:28 PM, Andrew Pogrebennyk <span dir="ltr">&lt;<a href="mailto:apogrebennyk@sipwise.com">apogrebennyk@sipwise.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">
<div class="im">On 10/30/2011 06:00 AM, Austin Einter wrote:<br>&gt; When I run kamailio, I get below error.<br>&gt;<br>&gt;  0(4925) CRITICAL: dialog [dialog.c:297]: profile &lt;caller&gt; not definited<br></div>&gt; [...]<br>

<div class="im">&gt; Any idea why this error comes and how to fix it.<br><br></div>You should really define profile caller by putting it into<br>profiles_with_value module parameter:<br><a href="http://kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id2523534" target="_blank">http://kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id2523534</a><br>

<div>
<div></div>
<div class="h5"><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></div></div></blockquote></div><br>