<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("INVITE")) {<br> if (!has_totag()) {<br> #$var(SIZE) = 0;<br> get_profile_size("caller", "$fu", "$var(SIZE)");<br>
xlog("Number of calls present now is $var(SIZE)\n");<br> if( $var(SIZE) > MAX_NUMBER_OF_CALLS ) {<br> sl_send_reply("503", "Simultaneous calls limit reached");<br>
xlog("Rejected calls with 503 Simultaneous calls limit reached\n");<br> exit;<br> }<br> else {<br> xlog("Allowed call. Looks max calls limit not reached. Calls= $var(SIZE)\n");<br>
}<br> set_dlg_profile("caller","$fu");<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"><<a href="mailto:apogrebennyk@sipwise.com">apogrebennyk@sipwise.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 class="im">On 10/30/2011 06:00 AM, Austin Einter wrote:<br>> When I run kamailio, I get below error.<br>><br>> 0(4925) CRITICAL: dialog [dialog.c:297]: profile <caller> not definited<br></div>> [...]<br>
<div class="im">> 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>