Hi,<br>I'm trying to limit a calls of an user by using the script above <br><br>route[39]<br>{<br> if(!isflagset(31))<br> {<br> if( avp_db_load("$fu/username","a") && avp_check("$avp(channels)", "ge/0"))<br>
{<br> # get current calls for user<br> get_profile_size("caller","$fu","$var(calls)");<br><br> # check within limit<br>
if($avp(channels) > $var(calls))<br> {<br> xlog("L_INFO", "Call control: user '$fU' currently has '$var(calls)' of '$avp(channels)' active calls before this one\n");<br>
$var(setprofile) = 1;<br> }<br> else<br> {<br> xlog("L_INFO", "Call control: user channel limit exceeded [$var(calls)/$avp(channels)]\n");<br>
send_reply("487", "Request Terminated: Channel limit exceeded\n");<br> exit;<br> }<br> }<br> else<br>
{<br> $var(setprofile) = 0;<br> }<br> if($var(setprofile) > 0)<br> {<br> xlog("L_INFO", "Call control, setprofile: $var(setprofile)\n");<br>
create_dialog();<br> set_dlg_profile("caller","$fu");<br><br> }<br> setflag(31);<br> }<br>}<br>But if i limit the max calls at 1 i can make more than one calls.<br>
<br>can you help me please ??<br clear="all"><br>-- <br><font color="#663300"><font face="comic sans ms,sans-serif"><br><span style="color:rgb(0,0,0)">Best Regards.</span><br></font></font><br><br>