[Freeswitch-svn] [commit] r11074 - in freeswitch/trunk/src: . include
FreeSWITCH SVN
anthm at freeswitch.org
Mon Jan 5 12:43:53 PST 2009
Author: anthm
Date: Mon Jan 5 14:43:53 2009
New Revision: 11074
Log:
make conference verbose-events param to control if events have all the channel data or not
Modified:
freeswitch/trunk/src/include/switch_channel.h
freeswitch/trunk/src/switch_channel.c
Modified: freeswitch/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/trunk/src/include/switch_channel.h (original)
+++ freeswitch/trunk/src/include/switch_channel.h Mon Jan 5 14:43:53 2009
@@ -472,6 +472,9 @@
*/
SWITCH_DECLARE(void) switch_channel_event_set_data(_In_ switch_channel_t *channel, _In_ switch_event_t *event);
+SWITCH_DECLARE(void) switch_channel_event_set_basic_data(_In_ switch_channel_t *channel, _In_ switch_event_t *event);
+SWITCH_DECLARE(void) switch_channel_event_set_extended_data(_In_ switch_channel_t *channel, _In_ switch_event_t *event);
+
/*!
\brief Expand varaibles in a string based on the variables in a paticular channel
\param channel channel to expand the variables from
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Mon Jan 5 14:43:53 2009
@@ -1140,13 +1140,12 @@
return channel->state;
}
-SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel_t *channel, switch_event_t *event)
+SWITCH_DECLARE(void) switch_channel_event_set_basic_data(switch_channel_t *channel, switch_event_t *event)
{
switch_caller_profile_t *caller_profile, *originator_caller_profile = NULL, *originatee_caller_profile = NULL;
- switch_event_header_t *hi;
switch_codec_t *codec;
char state_num[25];
- int x;
+
switch_mutex_lock(channel->profile_mutex);
if ((caller_profile = switch_channel_get_caller_profile(channel))) {
@@ -1178,7 +1177,7 @@
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Write-Codec-Name", switch_str_nil(codec->implementation->iananame));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Channel-Write-Codec-Rate", "%u", codec->implementation->actual_samples_per_second);
}
-
+
/* Index Caller's Profile */
if (caller_profile) {
switch_caller_profile_event_set_data(caller_profile, "Caller", event);
@@ -1199,7 +1198,15 @@
}
}
+}
+SWITCH_DECLARE(void) switch_channel_event_set_extended_data(switch_channel_t *channel, switch_event_t *event)
+{
+ switch_event_header_t *hi;
+ int x;
+
+ switch_channel_event_set_basic_data(channel, event);
+
if (switch_channel_test_flag(channel, CF_VERBOSE_EVENTS) ||
event->event_id == SWITCH_EVENT_CHANNEL_ORIGINATE ||
event->event_id == SWITCH_EVENT_CHANNEL_UUID ||
@@ -1235,6 +1242,15 @@
switch_mutex_unlock(channel->profile_mutex);
}
+
+SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel_t *channel, switch_event_t *event)
+{
+ switch_channel_event_set_basic_data(channel, event);
+ switch_channel_event_set_extended_data(channel, event);
+}
+
+
+
SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile)
{
char *uuid = NULL;
More information about the Freeswitch-svn
mailing list