summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-07-20 01:15:55 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-07-20 01:15:55 +0000
commit54991ca2a7dc23a3da064bd63c39fcdaf21143b7 (patch)
tree17818a04bc982abeee73c509d00957340ce0cf91 /main
parent2f674bcdd133056f9695eb63aa89c90c05bb1c55 (diff)
Add the AccountCode header to the AMI Hangup event.
It's harder to correlate the Newchannel and Hangup AMI events without specifying "AccountCode" in both. (closes issue ASTERISK-19963) Reported by: Oleg A. Arkhangelsky Patches: hangup_acctcode.diff (license #6397) patch uploaded by Oleg A. Arkhangelsky git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/channel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index 1cfb76702..6b4f8b721 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2758,6 +2758,7 @@ int ast_hangup(struct ast_channel *chan)
"CallerIDName: %s\r\n"
"ConnectedLineNum: %s\r\n"
"ConnectedLineName: %s\r\n"
+ "AccountCode: %s\r\n"
"Cause: %d\r\n"
"Cause-txt: %s\r\n",
ast_channel_name(chan),
@@ -2766,6 +2767,7 @@ int ast_hangup(struct ast_channel *chan)
S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, "<unknown>"),
S_COR(ast_channel_connected(chan)->id.number.valid, ast_channel_connected(chan)->id.number.str, "<unknown>"),
S_COR(ast_channel_connected(chan)->id.name.valid, ast_channel_connected(chan)->id.name.str, "<unknown>"),
+ ast_channel_accountcode(chan),
ast_channel_hangupcause(chan),
ast_cause2str(ast_channel_hangupcause(chan))
);