[Freeswitch-svn] [commit] r8110 - freeswitch/trunk/src
Freeswitch SVN
anthm at freeswitch.org
Mon Apr 14 13:30:45 EDT 2008
Author: anthm
Date: Mon Apr 14 13:30:45 2008
New Revision: 8110
Modified:
freeswitch/trunk/src/switch_ivr_originate.c
Log:
set bracket vars before firing the CHANNEL_ORIGINATE event
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Mon Apr 14 13:30:45 2008
@@ -826,19 +826,6 @@
peer_channels[i] = switch_core_session_get_channel(new_session);
switch_channel_set_flag(peer_channels[i], CF_ORIGINATING);
- 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);
- switch_assert(event);
- switch_channel_event_set_data(peer_channels[i], event);
- switch_event_fire(&event);
- }
-
if (vdata) {
char *var_array[1024] = { 0 };
int var_count = 0;
@@ -857,6 +844,19 @@
}
}
+ 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);
+ switch_assert(event);
+ switch_channel_event_set_data(peer_channels[i], event);
+ switch_event_fire(&event);
+ }
+
if (!table) {
table = &originate_state_handlers;
}
More information about the Freeswitch-svn
mailing list