mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
Add optional call limit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
7
cli.c
7
cli.c
@@ -429,8 +429,13 @@ static int handle_chanlist(int fd, int argc, char *argv[])
|
||||
ast_mutex_unlock(&c->lock);
|
||||
c = ast_channel_walk_locked(c);
|
||||
}
|
||||
if(!concise)
|
||||
if(!concise) {
|
||||
ast_cli(fd, "%d active channel(s)\n", numchans);
|
||||
if (option_maxcalls)
|
||||
ast_cli(fd, "%d of %d max active call(s) (%5.2f%% of capacity)\n", ast_active_calls(), option_maxcalls, ((float)ast_active_calls() / (float)option_maxcalls) * 100.0);
|
||||
else
|
||||
ast_cli(fd, "%d active call(s)\n", ast_active_calls());
|
||||
}
|
||||
return RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user