[Freeswitch-trunk] [commit] r6537 - in freeswitch/trunk/src: . include
Freeswitch SVN
anthm at freeswitch.org
Thu Dec 6 10:46:54 EST 2007
Author: anthm
Date: Thu Dec 6 10:46:54 2007
New Revision: 6537
Modified:
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/switch_ivr_bridge.c
Log:
add vars
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Thu Dec 6 10:46:54 2007
@@ -97,6 +97,8 @@
#define SWITCH_PATH_SEPARATOR "/"
#endif
#define SWITCH_URL_SEPARATOR "://"
+#define SWITCH_BRIDGE_CHANNEL_VARIABLE "bridge_channel"
+#define SWITCH_BRIDGE_UUID_VARIABLE "bridge_uuid"
#define SWITCH_PLAYBACK_TERMINATORS_VARIABLE "playback_terminators"
#define SWITCH_CACHE_SPEECH_HANDLES_VARIABLE "cache_speech_handles"
#define SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME "__cache_speech_handles_obj__"
Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c (original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c Thu Dec 6 10:46:54 2007
@@ -641,6 +641,11 @@
}
+ switch_channel_set_variable(caller_channel, SWITCH_BRIDGE_CHANNEL_VARIABLE, switch_channel_get_name(peer_channel));
+ switch_channel_set_variable(caller_channel, SWITCH_BRIDGE_UUID_VARIABLE, switch_core_session_get_uuid(peer_session));
+ switch_channel_set_variable(peer_channel, SWITCH_BRIDGE_CHANNEL_VARIABLE, switch_channel_get_name(caller_channel));
+ switch_channel_set_variable(peer_channel, SWITCH_BRIDGE_UUID_VARIABLE, switch_core_session_get_uuid(session));
+
switch_channel_set_private(peer_channel, "_bridge_", b_leg);
switch_channel_set_state(peer_channel, CS_LOOPBACK);
audio_bridge_thread(NULL, (void *) a_leg);
@@ -708,6 +713,12 @@
switch_channel_add_state_handler(originatee_channel, &uuid_bridge_state_handlers);
switch_channel_set_variable(originator_channel, SWITCH_UUID_BRIDGE, switch_core_session_get_uuid(originatee_session));
+
+ switch_channel_set_variable(originator_channel, SWITCH_BRIDGE_CHANNEL_VARIABLE, switch_channel_get_name(originatee_channel));
+ switch_channel_set_variable(originator_channel, SWITCH_BRIDGE_UUID_VARIABLE, switch_core_session_get_uuid(originatee_session));
+ switch_channel_set_variable(originatee_channel, SWITCH_BRIDGE_CHANNEL_VARIABLE, switch_channel_get_name(originator_channel));
+ switch_channel_set_variable(originatee_channel, SWITCH_BRIDGE_UUID_VARIABLE, switch_core_session_get_uuid(originator_session));
+
switch_channel_set_flag(originator_channel, CF_BREAK);
switch_channel_set_flag(originatee_channel, CF_BREAK);
More information about the Freeswitch-trunk
mailing list