diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-02-23 22:48:47 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-02-23 22:48:47 +0000 |
commit | 6898f073dee1b0642ab4d3bc5da03721bdd7e5ba (patch) | |
tree | 5cac482ff6e93ba883893efeabb3ed534e83e9d0 /cli.c | |
parent | f8adb7e1138998183c958889748cc53648942a7a (diff) |
Merge anthm's CDR updates (bug #3595)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5068 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rwxr-xr-x | cli.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -651,10 +651,11 @@ static int handle_showchan(int fd, int argc, char *argv[]) { struct ast_channel *c=NULL; struct timeval now; - char buf[1024]; + char buf[2048]; char cdrtime[256]; long elapsed_seconds=0; int hour=0, min=0, sec=0; + if (argc != 3) return RESULT_SHOWUSAGE; gettimeofday(&now, NULL); @@ -709,9 +710,11 @@ static int handle_showchan(int fd, int argc, char *argv[]) ( c-> data ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"), (ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)")); if(pbx_builtin_serialize_variables(c,buf,sizeof(buf))) - ast_cli(fd,"Variables:\n%s\n",buf); + ast_cli(fd," Variables:\n%s\n",buf); + if(c->cdr && ast_cdr_serialize_variables(c->cdr,buf, sizeof(buf), '=', '\n', 1)) + ast_cli(fd," CDR Variables:\n%s\n",buf); - ast_mutex_unlock(&c->lock); + ast_mutex_unlock(&c->lock); break; } ast_mutex_unlock(&c->lock); |