[Freeswitch-svn] [commit] r11073 - freeswitch/trunk/src/mod/applications/mod_conference

FreeSWITCH SVN anthm at freeswitch.org
Mon Jan 5 12:25:02 PST 2009


Author: anthm
Date: Mon Jan  5 14:25:02 2009
New Revision: 11073

Log:
make conference verbose-events param to control if events have all the channel data or not

Modified:
   freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c

Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	Mon Jan  5 14:25:02 2009
@@ -264,6 +264,7 @@
 	int comfort_noise_level;
 	int video_running;
 	uint32_t eflags;
+	uint32_t verbose_events;
 } conference_obj_t;
 
 /* Relationship with another member */
@@ -401,13 +402,13 @@
 	if (!member)
 		return status;
 
-	if (member->session) {
-		switch_channel_t *channel = switch_core_session_get_channel(member->session);
-		switch_channel_event_set_data(channel, event);
-	}
-
 	if (member->conference) {
 		status = conference_add_event_data(member->conference, event);
+
+		if (member->conference->verbose_events && member->session) {
+			switch_channel_t *channel = switch_core_session_get_channel(member->session);
+			switch_channel_event_set_data(channel, event);
+		}
 	}
 
 	switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-ID", "%u", member->id);
@@ -5018,6 +5019,7 @@
 	switch_status_t status;
 	int comfort_noise_level = 0;
 	char *suppress_events = NULL;
+	char *verbose_events = NULL;
 	char *auto_record = NULL;
 
 	/* Validate the conference name */
@@ -5137,6 +5139,8 @@
 			}
 		} else if (!strcasecmp(var, "suppress-events") && !switch_strlen_zero(val)) {
 			suppress_events = val;
+		} else if (!strcasecmp(var, "verbose-events") && !switch_strlen_zero(val)) {
+			verbose_events = val;
 		} else if (!strcasecmp(var, "auto-record") && !switch_strlen_zero(val)) {
 			auto_record = val;
 		}
@@ -5296,6 +5300,10 @@
 	if (!switch_strlen_zero(auto_record)) {
 		conference->auto_record = switch_core_strdup(conference->pool, auto_record);
 	}
+
+	if (!switch_strlen_zero(verbose_events) && switch_true(verbose_events)) {
+		conference->verbose_events = 1;
+	}
 	
 	/* caller control configuration chores */
 	if (switch_ivr_digit_stream_parser_new(conference->pool, &conference->dtmf_parser) == SWITCH_STATUS_SUCCESS) {



More information about the Freeswitch-svn mailing list