[Freeswitch-svn] [commit] r5886 - in freeswitch/trunk/src: . include
Freeswitch SVN
anthm at freeswitch.org
Tue Oct 16 09:56:45 EDT 2007
Author: anthm
Date: Tue Oct 16 09:56:44 2007
New Revision: 5886
Modified:
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/switch_event.c
freeswitch/trunk/src/switch_ivr_originate.c
Log:
add channel_originate event
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Tue Oct 16 09:56:44 2007
@@ -851,6 +851,7 @@
SWITCH_EVENT_CHANNEL_PARK - A channel has been parked
SWITCH_EVENT_CHANNEL_UNPARK - A channel has been unparked
SWITCH_EVENT_CHANNEL_APPLICATION- A channel has called and event from an application
+ SWITCH_EVENT_CHANNEL_ORIGINATE - A channel has been originated
SWITCH_EVENT_API - An API call has been executed
SWITCH_EVENT_LOG - A LOG event has been triggered
SWITCH_EVENT_INBOUND_CHAN - A new inbound channel has been created
@@ -902,6 +903,7 @@
SWITCH_EVENT_CHANNEL_PARK,
SWITCH_EVENT_CHANNEL_UNPARK,
SWITCH_EVENT_CHANNEL_APPLICATION,
+ SWITCH_EVENT_CHANNEL_ORIGINATE,
SWITCH_EVENT_API,
SWITCH_EVENT_LOG,
SWITCH_EVENT_INBOUND_CHAN,
Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c (original)
+++ freeswitch/trunk/src/switch_event.c Tue Oct 16 09:56:44 2007
@@ -120,6 +120,7 @@
"CHANNEL_PARK",
"CHANNEL_UNPARK",
"CHANNEL_APPLICATION",
+ "CHANNEL_ORIGINATE",
"API",
"LOG",
"INBOUND_CHAN",
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Tue Oct 16 09:56:44 2007
@@ -536,11 +536,16 @@
assert(peer_channels[i] != NULL);
if (var_event) {
+ switch_event_t *event;
switch_event_header_t *header;
/* install the vars from the {} params */
for (header = var_event->headers; header; header = header->next) {
switch_channel_set_variable(peer_channels[i], header->name, header->value);
}
+ switch_event_create(&event, SWITCH_EVENT_CHANNEL_ORIGINATE);
+ assert(event);
+ switch_channel_event_set_data(peer_channels[i], event);
+ switch_event_fire(&event);
}
if (!table) {
More information about the Freeswitch-svn
mailing list