diff options
author | Kevin Harwell <kharwell@digium.com> | 2014-01-27 21:09:33 +0000 |
---|---|---|
committer | Kevin Harwell <kharwell@digium.com> | 2014-01-27 21:09:33 +0000 |
commit | f9479fbcbd82343a0df7080e7cad17e27b018e32 (patch) | |
tree | 013e5cdd9146fd3a7b7907a51b325aa623685c75 | |
parent | 8a762efb35763460845aa19bc93ad985866f9548 (diff) |
manager: ExtensionStatus event status human readable
When an 'ExtensionStatus' event was raised it included the status as a
numerical value, but did not include a text description of the status.
Added a 'StatusText' field to the event which is a string representation
of the extension status. Also added this to the 'Extension State' command
response.
(closes issue ASTERISK-23154)
Reported by: Jonathan Rose
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | main/manager.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/main/manager.c b/main/manager.c index ef569aa4a..21a5160f7 100644 --- a/main/manager.c +++ b/main/manager.c @@ -4942,8 +4942,10 @@ static int action_extensionstate(struct mansession *s, const struct message *m) "Exten: %s\r\n" "Context: %s\r\n" "Hint: %s\r\n" - "Status: %d\r\n\r\n", - exten, context, hint, status); + "Status: %d\r\n" + "StatusText: %s\r\n\r\n", + exten, context, hint, status, + ast_extension_state2str(status)); return 0; } @@ -6124,11 +6126,13 @@ static int manager_state_cb(char *context, char *exten, struct ast_state_cb_info "Exten: %s\r\n" "Context: %s\r\n" "Hint: %s\r\n" - "Status: %d\r\n", + "Status: %d\r\n" + "StatusText: %s\r\n", exten, context, hint, - info->exten_state); + info->exten_state, + ast_extension_state2str(info->exten_state)); break; case AST_HINT_UPDATE_PRESENCE: /*** DOCUMENTATION |