[asterisk-commits] bmd: branch group/newcdr r118613 - in /team/group/newcdr: apps/ channels/ inc...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 27 19:13:32 CDT 2008


Author: bmd
Date: Tue May 27 19:13:31 2008
New Revision: 118613

URL: http://svn.digium.com/view/asterisk?view=rev&rev=118613
Log:
This is part omnibus commit, part interim commit.  I got a bit ahead
of myself and now have to commit some working but unfinished stuff.
Changes include:

* Added an "extra" arg to ast_cel_report_event which logs extra data.

* Added a second arg to CELGenUerEvent to supply extra info.  So, for
  instance, you can now do something like
  CELGenUserEvent(OPERATOR,Bob) to log an operator event with the
  extra info of "Bob".

* Added a dateformat field to cel.conf so you can specify how the date
  is presented.  Currently this only is available in the fabricated
  channel vars, so we might want to push it out into it's own function,
  callable by other backends.

* Removed a bunch of unused functions in cel.c/cel.h

Still TODO:
Add extra event information to system events such as the transfer events.


Modified:
    team/group/newcdr/apps/app_celgenuserevent.c
    team/group/newcdr/channels/chan_sip.c
    team/group/newcdr/channels/chan_zap.c
    team/group/newcdr/include/asterisk/cel.h
    team/group/newcdr/include/asterisk/event_defs.h
    team/group/newcdr/main/cel.c
    team/group/newcdr/main/channel.c
    team/group/newcdr/main/pbx.c

Modified: team/group/newcdr/apps/app_celgenuserevent.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_celgenuserevent.c?view=diff&rev=118613&r1=118612&r2=118613
==============================================================================
--- team/group/newcdr/apps/app_celgenuserevent.c (original)
+++ team/group/newcdr/apps/app_celgenuserevent.c Tue May 27 19:13:31 2008
@@ -30,18 +30,9 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include <stdlib.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
+#include "asterisk/module.h"
+#include "asterisk/app.h"
 #include "asterisk/channel.h"
-#include "asterisk/pbx.h"
-#include "asterisk/cel.h"
-#include "asterisk/module.h"
 
 static char *app = "CELGenUserEvent";
 static char *synopsis = 
@@ -52,36 +43,28 @@
 	"with the supplied name for a type\n";
 
 
-
-static int CELGenUserEvent_exec(struct ast_channel *chan, void *data)
+static int celgenuserevent_exec(struct ast_channel *chan, void *data)
 {
 	int res = 0;
 	struct ast_module_user *u;
-	char *d2 = data;
-	char *d3;
+	char *parse;
+	AST_DECLARE_APP_ARGS(args,
+		AST_APP_ARG(event);
+		AST_APP_ARG(extra);
+	);
 
-	while (d2 && *d2 && isspace(*d2)) /* trim leading blanks */
-		d2++;
-	
-	if (d2 && *d2)
-		d3=d2+strlen(d2)-1;
-	else
-		d3 = d2;
-	
-	while (d3 && *d3 && isspace(*d3)) {
-		*d3 = 0;
-		d3--;
-	}
-	
-	if (ast_strlen_zero(d2)) {
-		ast_log(LOG_ERROR, "CELGenUserEvent needs an event name!\n");
+	if (ast_strlen_zero(data)) {
 		return 0;
 	}
 
+	parse = ast_strdupa(data);
+	AST_STANDARD_APP_ARGS(args, parse);
+	if (args.argc == 1) {
+		args.extra = NULL;
+	}
+
 	u = ast_module_user_add(chan);
-
-	ast_cel_report_event(chan, CEL_USER_DEFINED, d2, NULL);
-
+	ast_cel_report_event(chan, CEL_USER_DEFINED, args.event, args.extra, NULL);
 	ast_module_user_remove(u);
 	return res;
 }
@@ -99,7 +82,7 @@
 
 static int load_module(void)
 {
-	return ast_register_application(app, CELGenUserEvent_exec, synopsis, descrip);
+	return ast_register_application(app, celgenuserevent_exec, synopsis, descrip);
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Generate a User-Defined CEL event");

Modified: team/group/newcdr/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/channels/chan_sip.c?view=diff&rev=118613&r1=118612&r2=118613
==============================================================================
--- team/group/newcdr/channels/chan_sip.c (original)
+++ team/group/newcdr/channels/chan_sip.c Tue May 27 19:13:31 2008
@@ -17985,7 +17985,7 @@
 	} else {
 		/* Transfer succeeded! */
 
-		ast_cel_report_event(target.chan1, CEL_ATTENDEDTRANSFER, NULL, target.chan2);
+		ast_cel_report_event(target.chan1, CEL_ATTENDEDTRANSFER, NULL, NULL, target.chan2);
 		
 		/* Tell transferer that we're done. */
 		transmit_notify_with_sipfrag(transferer, seqno, "200 OK", TRUE);
@@ -18324,7 +18324,7 @@
 		/* Success  - we have a new channel */
 		ast_debug(3, "%s transfer succeeded. Telling transferer.\n", p->refer->attendedtransfer? "Attended" : "Blind");
 
-		ast_cel_report_event(current.chan1, p->refer->attendedtransfer? CEL_ATTENDEDTRANSFER : CEL_BLINDTRANSFER, NULL, current.chan2);
+		ast_cel_report_event(current.chan1, p->refer->attendedtransfer? CEL_ATTENDEDTRANSFER : CEL_BLINDTRANSFER, NULL, NULL, current.chan2);
 		transmit_notify_with_sipfrag(p, seqno, "200 Ok", TRUE);
 		if (p->refer->localtransfer)
 			p->refer->status = REFER_200OK;

Modified: team/group/newcdr/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/channels/chan_zap.c?view=diff&rev=118613&r1=118612&r2=118613
==============================================================================
--- team/group/newcdr/channels/chan_zap.c (original)
+++ team/group/newcdr/channels/chan_zap.c Tue May 27 19:13:31 2008
@@ -4897,7 +4897,7 @@
 							ast_hangup(chan);
 						} else {
 							ast_verb(3, "Started three way call on channel %d\n", p->channel);
-							ast_cel_report_event(p->subs[SUB_THREEWAY].owner, CEL_HOOKFLASH, NULL, chan);
+							ast_cel_report_event(p->subs[SUB_THREEWAY].owner, CEL_HOOKFLASH, NULL, NULL, chan);
 							
 							/* Start music on hold if appropriate */
 							if (ast_bridged_channel(p->subs[SUB_THREEWAY].owner)) {
@@ -4920,7 +4920,7 @@
 							p->owner = p->subs[SUB_REAL].owner;
 						}
 						/* Drop the last call and stop the conference */
-						ast_cel_report_event(p->subs[SUB_REAL].owner, CEL_3WAY_END, NULL, p->subs[SUB_THREEWAY].owner);
+						ast_cel_report_event(p->subs[SUB_REAL].owner, CEL_3WAY_END, NULL, NULL, p->subs[SUB_THREEWAY].owner);
 						ast_verb(3, "Dropping three-way call on %s\n", p->subs[SUB_THREEWAY].owner->name);
 						p->subs[SUB_THREEWAY].owner->_softhangup |= AST_SOFTHANGUP_DEV;
 						p->subs[SUB_REAL].inthreeway = 0;
@@ -4969,7 +4969,7 @@
 								ast_queue_control(p->subs[otherindex].owner, AST_CONTROL_UNHOLD);
 							p->subs[otherindex].needunhold = 1;
 							p->owner = p->subs[SUB_REAL].owner;
-							ast_cel_report_event(p->subs[SUB_REAL].owner, CEL_3WAY_START, NULL, p->subs[SUB_THREEWAY].owner);
+							ast_cel_report_event(p->subs[SUB_REAL].owner, CEL_3WAY_START, NULL, NULL, p->subs[SUB_THREEWAY].owner);
 							if (ast->_state == AST_STATE_RINGING) {
 								ast_debug(1, "Enabling ringtone on real and threeway\n");
 								res = tone_zone_play_tone(p->subs[SUB_REAL].zfd, ZT_TONE_RINGTONE);

Modified: team/group/newcdr/include/asterisk/cel.h
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/include/asterisk/cel.h?view=diff&rev=118613&r1=118612&r2=118613
==============================================================================
--- team/group/newcdr/include/asterisk/cel.h (original)
+++ team/group/newcdr/include/asterisk/cel.h Tue May 27 19:13:31 2008
@@ -115,17 +115,6 @@
  */
 void ast_cel_check_retire_linkedid(const struct ast_channel *chan);
 
-int ast_cel_setaccount(struct ast_channel *chan, const char *account);
-
-int ast_cel_setamaflags(struct ast_channel *chan, const char *flag);
-
-int ast_cel_amaflags2int(const char *flag);
-
-/*! Set a CEL channel variable 
-	\note You can't set the CEL variables that are managed by the PBX
-*/
-int ast_cel_setvar(struct ast_channel *chan, const char *name, const char *value);
-
 /*! Create a fake channel containing the serialized channel date in
  the given cel event.  Must be freed with ast_dummy_channel_free */
 struct ast_channel* ast_cel_fabricate_channel_from_event(const struct ast_event *event);
@@ -133,7 +122,7 @@
 /*! Frees the cel struct */
 void ast_cel_destroy(struct ast_cel *cel);
 
-void ast_cel_report_event(const struct ast_channel *chan, enum ast_cel_eventtype, char *userdefevname, const struct ast_channel *peer2);
+void ast_cel_report_event(const struct ast_channel *chan, enum ast_cel_eventtype, char *userdefevname, const char *extra, const struct ast_channel *peer2);
 
 
 int ast_cel_engine_init(void);

Modified: team/group/newcdr/include/asterisk/event_defs.h
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/include/asterisk/event_defs.h?view=diff&rev=118613&r1=118612&r2=118613
==============================================================================
--- team/group/newcdr/include/asterisk/event_defs.h (original)
+++ team/group/newcdr/include/asterisk/event_defs.h Tue May 27 19:13:31 2008
@@ -236,7 +236,13 @@
 	 * Used by: AST_EVENT_CEL
 	 * Payload type: STR
 	 */
-	AST_EVENT_IE_CEL_PEERACCT = 0x1e
+	AST_EVENT_IE_CEL_PEERACCT = 0x1e,
+	/*! 
+	 * \brief Channel Event extra data
+	 * Used by: AST_EVENT_CEL
+	 * Payload type: STR
+	 */
+	AST_EVENT_IE_CEL_EXTRA = 0x1f
 };
 
 /*!

Modified: team/group/newcdr/main/cel.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/main/cel.c?view=diff&rev=118613&r1=118612&r2=118613
==============================================================================
--- team/group/newcdr/main/cel.c (original)
+++ team/group/newcdr/main/cel.c Tue May 27 19:13:31 2008
@@ -53,6 +53,7 @@
 static int cel_enabled;		/*! Is the CEL subsystem enabled ? */
 static long long eventset = 0; /*! which events we want to track; up to 64 events */
 static struct ast_hashtab *appset = 0;
+static char cel_dateformat[256] = "";
 
 int check_cel_enabled()
 {
@@ -162,9 +163,9 @@
 	was_enabled = cel_enabled;
 	cel_enabled = 1;
 	if (appset) {
+		char *str;
 		/* a pre-existing hash table == destroy it */
 		/* first, free all the entries */
-		char *str;
 		struct ast_hashtab_iter *it;
 		it = ast_hashtab_start_traversal(appset);
 		while ((str=ast_hashtab_next(it))) {
@@ -183,7 +184,13 @@
 			cel_enabled = ast_true(enabled_value);
 		}
 		if (cel_enabled) {
-			
+			const char *s;
+
+			/* get the date format for logging */
+			if ((s = ast_variable_retrieve(config, "general", "dateformat"))) {
+				ast_copy_string(cel_dateformat, s, sizeof(cel_dateformat));
+			}
+
 			if ((eventlist = ast_variable_retrieve(config, "general", "events"))) {
 				char *t1, *t2, *t3, *myeventlist = ast_strdup(eventlist);
 				t1 = myeventlist;
@@ -388,7 +395,7 @@
 	const char *linkedid = chan->linkedid;
 
 	/* make sure we need to do all this work */
-	if (!ast_strlen_zero(linkedid) && (eventset & CEL_LINKEDID_END)) {
+	if (!ast_strlen_zero(linkedid) && track_event(CEL_LINKEDID_END)) {
 
 		while ((tmp = ast_channel_walk_locked(tmp))) {
 
@@ -402,76 +409,7 @@
 		}
 
 		if (!found) {
-			ast_cel_report_event(chan, CEL_LINKEDID_END, NULL, NULL);
-		}
-	}
-}
-
-int ast_cel_setaccount(struct ast_channel *chan, const char *account)
-{
-
-	ast_string_field_set(chan, accountcode, account);
-	return 0;
-}
-
-int ast_cel_setamaflags(struct ast_channel *chan, const char *flag)
-{
-	int newflag = ast_cel_amaflags2int(flag);
-	chan->amaflags = newflag;
-	return 0;
-}
-
-/* readonly channel variables */
-static	const char *cel_readonly_vars[] = { "cidname", "cidnum", "cidani", "cidrdnis", "ciddnid", "exten", "context", "channame",
-											"appname", "appdata", "eventtype", "eventname","peer", 
-											"uniqueid",
-											NULL };
-
-
-/*! Set a CEL channel variable 
-	\note You can't set the CEL variables that are managed by the PBX
-*/
-int ast_cel_setvar(struct ast_channel *chan, const char *name, const char *value) 
-{
-	int x;
-	
-	for (x = 0; cel_readonly_vars[x]; x++) {
-		if (!strcasecmp(name, cel_readonly_vars[x])) {
-			ast_log(LOG_ERROR, "Attempt to set the '%s' read-only variable!.\n", name);
-			return -1;
-		}
-	}
-
-	if (!chan) {
-		ast_log(LOG_ERROR, "Attempt to set a variable on a NULL Channel.\n");
-		return -1;
-	}
-
-	return 0;
-}
-
-int ast_cel_amaflags2int(const char *flag)
-{
-	if (!strcasecmp(flag, "default"))
-		return 0;
-	if (!strcasecmp(flag, "omit"))
-		return AST_CDR_OMIT;
-	if (!strcasecmp(flag, "billing"))
-		return AST_CDR_BILLING;
-	if (!strcasecmp(flag, "documentation"))
-		return AST_CDR_DOCUMENTATION;
-	return -1;
-}
-
-static void cel_get_tv(struct timeval tv, const char *fmt, char *buf, int bufsize)
-{
-	if (fmt == NULL) {	/* raw mode */
-		snprintf(buf, bufsize, "%ld.%06ld", (long)tv.tv_sec, (long)tv.tv_usec);
-	} else {  
-		if (ast_tvzero(tv)) {
-			struct ast_tm tm;
-			ast_localtime(&tv, &tm, NULL);
-			ast_strftime(buf, bufsize, fmt, &tm);
+			ast_cel_report_event(chan, CEL_LINKEDID_END, NULL, NULL, NULL);
 		}
 	}
 }
@@ -491,7 +429,7 @@
 	struct ast_channel *tchan;
 
 	const char *cid_ani, *cid_rdnis, *cid_name, *cid_num, *cid_dnid;
-	const char *exten, *context, *channame, *appname, *appdata, *accountcode, *peeraccount, *uniqueid, *linkedid, *peer, *userfield;
+	const char *exten, *context, *channame, *appname, *appdata, *accountcode, *peeraccount, *uniqueid, *linkedid, *peer, *userfield, *extra;
 	unsigned int amaflag;
 
 	/* do not call ast_channel_alloc because this is not really a real channel */
@@ -522,6 +460,7 @@
 	linkedid = ast_event_get_ie_str(event, AST_EVENT_IE_CEL_LINKEDID);
 	amaflag = ast_event_get_ie_uint(event, AST_EVENT_IE_CEL_AMAFLAGS);
 	userfield = ast_event_get_ie_str(event, AST_EVENT_IE_CEL_USERFIELD);
+	extra = ast_event_get_ie_str(event, AST_EVENT_IE_CEL_EXTRA);
 	peer = ast_event_get_ie_str(event, AST_EVENT_IE_CEL_PEER);
 
 	/* next, fill the channel with their data */
@@ -530,9 +469,20 @@
 	else
 		newvariable = ast_var_assign("eventtype", ast_cel_eventtype2str(eventtype));
 	AST_LIST_INSERT_HEAD(headp, newvariable, entries);
-	
-	snprintf(timebuf, sizeof(timebuf), "%ld.%06ld", eventtime.tv_sec, eventtime.tv_usec);
+
+	/* XXX - format this according to some config-defined format */
+	if (ast_strlen_zero(cel_dateformat)) {
+		snprintf(timebuf, sizeof(timebuf), "%ld.%06ld", eventtime.tv_sec, eventtime.tv_usec);
+	}
+	else {
+		struct ast_tm tm;
+		ast_localtime(&eventtime, &tm, NULL);
+		ast_strftime(timebuf, sizeof(timebuf), cel_dateformat, &tm);
+	}
 	newvariable = ast_var_assign("eventtime", timebuf);
+	AST_LIST_INSERT_HEAD(headp, newvariable, entries);
+
+	newvariable = ast_var_assign("eventextra", extra);
 	AST_LIST_INSERT_HEAD(headp, newvariable, entries);
 
 	tchan->cid.cid_name = ast_strdup(cid_name);
@@ -559,7 +509,7 @@
 	return tchan;
 }
 
-void ast_cel_report_event(const struct ast_channel *chan, enum ast_cel_eventtype eventtype, char *userdefevname, const struct ast_channel *peer2)
+void ast_cel_report_event(const struct ast_channel *chan, enum ast_cel_eventtype eventtype, char *userdefevname, const char *extra, const struct ast_channel *peer2)
 {
 		
 	if (track_event(eventtype))
@@ -575,7 +525,7 @@
 		}
 
 		if (trackit) {
-			time_t eventtime;
+			struct timeval eventtime;
 			struct ast_event *ev;
 			char *udef = userdefevname;
 			const char *peername = "";
@@ -589,12 +539,16 @@
 			
 			if (!udef)
 				udef = "";
+
+			if (!extra)
+				extra = "";
 		
-			eventtime = time(0);
+			eventtime = ast_tvnow();
 			/* now, report this event */
 			ev = ast_event_new(AST_EVENT_CEL, 
 							   AST_EVENT_IE_CEL_EVENT_TYPE, AST_EVENT_IE_PLTYPE_UINT, eventtype,
-							   AST_EVENT_IE_CEL_EVENT_TIME, AST_EVENT_IE_PLTYPE_UINT, (unsigned int)eventtime,
+							   AST_EVENT_IE_CEL_EVENT_TIME, AST_EVENT_IE_PLTYPE_UINT, eventtime.tv_sec,
+							   AST_EVENT_IE_CEL_EVENT_TIME_USEC, AST_EVENT_IE_PLTYPE_UINT, eventtime.tv_usec,
 							   AST_EVENT_IE_CEL_USEREVENT_NAME, AST_EVENT_IE_PLTYPE_STR, udef,
 							   AST_EVENT_IE_CEL_CIDNAME, AST_EVENT_IE_PLTYPE_STR, chan->cid.cid_name,
 							   AST_EVENT_IE_CEL_CIDNUM, AST_EVENT_IE_PLTYPE_STR, chan->cid.cid_num,
@@ -612,6 +566,7 @@
 							   AST_EVENT_IE_CEL_UNIQUEID, AST_EVENT_IE_PLTYPE_STR, chan->uniqueid,
 							   AST_EVENT_IE_CEL_LINKEDID, AST_EVENT_IE_PLTYPE_STR, chan->linkedid,
 							   AST_EVENT_IE_CEL_USERFIELD, AST_EVENT_IE_PLTYPE_STR, chan->userfield,
+							   AST_EVENT_IE_CEL_EXTRA, AST_EVENT_IE_PLTYPE_STR, extra,
 							   AST_EVENT_IE_CEL_PEER, AST_EVENT_IE_PLTYPE_STR, peername,
 							   AST_EVENT_IE_END);
 			if (!ev) {

Modified: team/group/newcdr/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/main/channel.c?view=diff&rev=118613&r1=118612&r2=118613
==============================================================================
--- team/group/newcdr/main/channel.c (original)
+++ team/group/newcdr/main/channel.c Tue May 27 19:13:31 2008
@@ -918,7 +918,7 @@
 	ast_cdr_init(tmp->cdr, tmp);
 	ast_cdr_start(tmp->cdr);
 	
-	ast_cel_report_event(tmp, CEL_CHANNEL_START, NULL, NULL);
+	ast_cel_report_event(tmp, CEL_CHANNEL_START, NULL, NULL, NULL);
 	
 	headp = &tmp->varshead;
 	AST_LIST_HEAD_INIT_NOLOCK(headp);
@@ -1306,7 +1306,7 @@
 	
 	headp=&chan->varshead;
 	
-	ast_cel_report_event(chan, CEL_CHANNEL_END, NULL, NULL);
+	ast_cel_report_event(chan, CEL_CHANNEL_END, NULL, NULL, NULL);
 	ast_cel_check_retire_linkedid(chan);
 	
 	AST_RWLIST_WRLOCK(&channels);
@@ -1687,7 +1687,7 @@
 			chan->generator->release(chan, chan->generatordata);
 	chan->generatordata = NULL;
 	chan->generator = NULL;
-	ast_cel_report_event(chan, CEL_HANGUP, NULL, NULL);
+	ast_cel_report_event(chan, CEL_HANGUP, NULL, NULL, NULL);
 	
 	if (chan->cdr) {		/* End the CDR if it hasn't already */
 		ast_cdr_end(chan->cdr);
@@ -1756,7 +1756,7 @@
 			res = chan->tech->answer(chan);
 		ast_setstate(chan, AST_STATE_UP);
 		ast_cdr_answer(chan->cdr);
-		ast_cel_report_event(chan, CEL_ANSWER, NULL, NULL);
+		ast_cel_report_event(chan, CEL_ANSWER, NULL, NULL, NULL);
 		ast_channel_unlock(chan);
 		if (delay)
 			ast_safe_sleep(chan, delay);
@@ -1764,7 +1764,7 @@
 		break;
 	case AST_STATE_UP:
 		ast_cdr_answer(chan->cdr);
-		ast_cel_report_event(chan, CEL_ANSWER, NULL, NULL);
+		ast_cel_report_event(chan, CEL_ANSWER, NULL, NULL, NULL);
 		break;
 	default:
 		break;
@@ -2558,7 +2558,7 @@
 					}
 					
 					ast_cdr_answer(chan->cdr);
-					ast_cel_report_event(chan, CEL_ANSWER, NULL, NULL);
+					ast_cel_report_event(chan, CEL_ANSWER, NULL, NULL, NULL);
 					
 				}
 			}
@@ -4589,7 +4589,7 @@
 	c1->_bridge = c0;
 
 	ast_set_owners_and_peers(c0, c1);
-	ast_cel_report_event(c0, CEL_BRIDGE_START, NULL, NULL);
+	ast_cel_report_event(c0, CEL_BRIDGE_START, NULL, NULL, NULL);
 
 	o0nativeformats = c0->nativeformats;
 	o1nativeformats = c1->nativeformats;
@@ -4728,7 +4728,7 @@
 					      "CallerID1: %s\r\n"
 					      "CallerID2: %s\r\n",
 					      c0->name, c1->name, c0->uniqueid, c1->uniqueid, c0->cid.cid_num, c1->cid.cid_num);
-				ast_cel_report_event(c0, CEL_BRIDGE_END, NULL, NULL);
+				ast_cel_report_event(c0, CEL_BRIDGE_END, NULL, NULL, NULL);
 
 				ast_debug(1, "Returning from native bridge, channels: %s, %s\n", c0->name, c1->name);
 
@@ -4763,7 +4763,7 @@
 			if (ast_channel_make_compatible(c0, c1)) {
 				ast_log(LOG_WARNING, "Can't make %s and %s compatible\n", c0->name, c1->name);
 				manager_bridge_event(0, 1, c0, c1);
-				ast_cel_report_event(c0, CEL_BRIDGE_END, NULL, NULL);
+				ast_cel_report_event(c0, CEL_BRIDGE_END, NULL, NULL, NULL);
 				return AST_BRIDGE_FAILED;
 			}
 			o0nativeformats = c0->nativeformats;
@@ -4784,7 +4784,7 @@
 	c0->_bridge = NULL;
 	c1->_bridge = NULL;
 
-	ast_cel_report_event(c0, CEL_BRIDGE_END, NULL, NULL);
+	ast_cel_report_event(c0, CEL_BRIDGE_END, NULL, NULL, NULL);
 	/* \todo  XXX here should check that cid_num is not NULL */
 	manager_event(EVENT_FLAG_CALL, "Unlink",
 		      "Channel1: %s\r\n"

Modified: team/group/newcdr/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/main/pbx.c?view=diff&rev=118613&r1=118612&r2=118613
==============================================================================
--- team/group/newcdr/main/pbx.c (original)
+++ team/group/newcdr/main/pbx.c Tue May 27 19:13:31 2008
@@ -743,14 +743,14 @@
 
 	c->appl = app->name;
 	c->data = data;
-	ast_cel_report_event(c,CEL_APP_START,NULL,NULL);
+	ast_cel_report_event(c, CEL_APP_START, NULL, NULL, NULL);
 	
 	if (app->module)
 		u = __ast_module_user_add(app->module, c);
 	res = app->execute(c, S_OR(data, ""));
 	if (app->module && u)
 		__ast_module_user_remove(app->module, u);
-	ast_cel_report_event(c,CEL_APP_END,NULL,NULL);
+	ast_cel_report_event(c, CEL_APP_END, NULL, NULL, NULL);
 	/* restore channel values */
 	c->appl = saved_c_appl;
 	c->data = saved_c_data;




More information about the asterisk-commits mailing list