mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Context tracing for channels
(closes issue #11268) Reported by: moy Patches: chantrace-datastored-encapsulated-rev94934.patch uploaded by moy (license 222) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
main/cli.c
10
main/cli.c
@@ -987,6 +987,9 @@ static char *handle_showchan(struct ast_cli_entry *e, int cmd, struct ast_cli_ar
|
||||
char nf[256], wf[256], rf[256];
|
||||
long elapsed_seconds=0;
|
||||
int hour=0, min=0, sec=0;
|
||||
#ifdef CHANNEL_TRACE
|
||||
int trace_enabled;
|
||||
#endif
|
||||
|
||||
switch (cmd) {
|
||||
case CLI_INIT:
|
||||
@@ -1071,7 +1074,12 @@ static char *handle_showchan(struct ast_cli_entry *e, int cmd, struct ast_cli_ar
|
||||
ast_cli(a->fd," Variables:\n%s\n", out->str);
|
||||
if (c->cdr && ast_cdr_serialize_variables(c->cdr, &out, '=', '\n', 1))
|
||||
ast_cli(a->fd," CDR Variables:\n%s\n", out->str);
|
||||
|
||||
#ifdef CHANNEL_TRACE
|
||||
trace_enabled = ast_channel_trace_is_enabled(c);
|
||||
ast_cli(a->fd, " Context Trace: %s\n", trace_enabled ? "Enabled" : "Disabled");
|
||||
if (trace_enabled && ast_channel_trace_serialize(c, &out))
|
||||
ast_cli(a->fd, " Trace:\n%s\n", out->str);
|
||||
#endif
|
||||
ast_channel_unlock(c);
|
||||
return CLI_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user