diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-18 01:49:13 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-18 01:49:13 +0000 |
commit | e2c8bb9c440289d09415aa7464bdfa921b91f426 (patch) | |
tree | d354c66fada464fed80154e7002ee445c4d36d52 /cli.c | |
parent | 6c8c36cb1296babe111fc188cf94358137df932d (diff) |
Add optional call limit
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5712 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rwxr-xr-x | cli.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; } |