[asterisk-commits] bmd: branch group/newcdr r119422 - /team/group/newcdr/main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 30 16:40:12 CDT 2008
Author: bmd
Date: Fri May 30 16:40:12 2008
New Revision: 119422
URL: http://svn.digium.com/view/asterisk?view=rev&rev=119422
Log:
add hangupcause to hangup event. TODO: hangupsource and dialstatus
Modified:
team/group/newcdr/main/channel.c
Modified: team/group/newcdr/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/main/channel.c?view=diff&rev=119422&r1=119421&r2=119422
==============================================================================
--- team/group/newcdr/main/channel.c (original)
+++ team/group/newcdr/main/channel.c Fri May 30 16:40:12 2008
@@ -1637,6 +1637,7 @@
{
int res = 0;
struct ast_cdr *cdr = NULL;
+ char cause_str[16];
/* Don't actually hang up a channel that will masquerade as someone else, or
if someone is going to masquerade as us */
@@ -1687,7 +1688,8 @@
chan->generator->release(chan, chan->generatordata);
chan->generatordata = NULL;
chan->generator = NULL;
- ast_cel_report_event(chan, CEL_HANGUP, NULL, NULL, NULL);
+ snprintf(cause_str, sizeof(cause_str), "%d", chan->hangupcause);
+ ast_cel_report_event(chan, CEL_HANGUP, NULL, cause_str, NULL);
if (chan->cdr) { /* End the CDR if it hasn't already */
ast_cdr_end(chan->cdr);
More information about the asterisk-commits
mailing list