[Freeswitch-svn] [commit] r9789 - in freeswitch/trunk/src: . include mod/applications/mod_commands mod/applications/mod_conference mod/applications/mod_dptools mod/applications/mod_voicemail mod/dialplans/mod_dialplan_xml mod/endpoints/mod_dingaling mod/endpoints/mod_sofia mod/event_handlers/mod_cdr_csv mod/event_handlers/mod_event_socket mod/xml_int/mod_xml_rpc
Freeswitch SVN
anthm at freeswitch.org
Thu Oct 2 13:10:06 EDT 2008
Author: anthm
Date: Thu Oct 2 13:10:05 2008
New Revision: 9789
Modified:
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c
freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_core.c
freeswitch/trunk/src/switch_core_session.c
freeswitch/trunk/src/switch_event.c
freeswitch/trunk/src/switch_ivr_async.c
freeswitch/trunk/src/switch_ivr_bridge.c
freeswitch/trunk/src/switch_ivr_originate.c
freeswitch/trunk/src/switch_ivr_play_say.c
freeswitch/trunk/src/switch_xml.c
Log:
add some more specific events
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Thu Oct 2 13:10:05 2008
@@ -1128,6 +1128,10 @@
SWITCH_EVENT_NOTIFY,
SWITCH_EVENT_SEND_MESSAGE,
SWITCH_EVENT_RECV_MESSAGE,
+ SWITCH_EVENT_REQUEST_PARAMS,
+ SWITCH_EVENT_CHANNEL_DATA,
+ SWITCH_EVENT_GENERAL,
+ SWITCH_EVENT_COMMAND,
SWITCH_EVENT_ALL
} switch_event_types_t;
Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c Thu Oct 2 13:10:05 2008
@@ -70,7 +70,7 @@
domain = "cluecon.com";
}
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "user", user);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "domain", domain);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "type", type);
@@ -224,7 +224,7 @@
}
- switch_event_create(&event, SWITCH_EVENT_MESSAGE);
+ switch_event_create(&event, SWITCH_EVENT_CHANNEL_DATA);
if (*uuid) {
if ((session = switch_core_session_locate(uuid))) {
switch_channel_event_set_data(switch_core_session_get_channel(session), event);
@@ -337,7 +337,7 @@
tag_attr_name = argv[2];
tag_attr_val = argv[3];
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "section", section);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "tag", tag);
@@ -1051,7 +1051,7 @@
} else {
if ((tsession = switch_core_session_locate(uuid))) {
switch_event_t *event;
- if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
switch_event_add_body(event, "%s", text);
if (switch_core_session_receive_event(tsession, &event) != SWITCH_STATUS_SUCCESS) {
switch_event_destroy(&event);
@@ -2462,7 +2462,7 @@
channel = switch_core_session_get_channel(psession);
- if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_DATA) == SWITCH_STATUS_SUCCESS) {
switch_xml_t xml;
switch_channel_event_set_data(channel, event);
if (!strcasecmp(format, "xml")) {
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 Thu Oct 2 13:10:05 2008
@@ -3390,7 +3390,7 @@
goto done;
}
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "conf_name", conf_name);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "profile_name", profile_name);
@@ -4248,7 +4248,7 @@
}
#endif
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_COMMAND);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "conf_name", conf_name);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "profile_name", profile_name);
@@ -5221,7 +5221,7 @@
switch_xml_t cxml, cfg, advertise, room;
switch_event_t *params = NULL;
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_COMMAND);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "presence", "true");
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Thu Oct 2 13:10:05 2008
@@ -894,7 +894,7 @@
switch_event_t *event;
char *buf;
- if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_DATA) == SWITCH_STATUS_SUCCESS) {
switch_channel_event_set_data(switch_core_session_get_channel(session), event);
switch_event_serialize(event, &buf, SWITCH_FALSE);
switch_assert(buf);
@@ -1111,7 +1111,7 @@
switch_xml_t cxml = NULL, cfg = NULL, xml_menus = NULL, xml_menu = NULL;
/* Open the config from the xml registry */
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(params);
switch_channel_event_set_data(channel, params);
@@ -1998,7 +1998,7 @@
*domain++ = '\0';
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "as_channel", "true");
@@ -2062,7 +2062,7 @@
} else {
switch_event_t *event = var_event;
if (!event) {
- switch_event_create(&event, SWITCH_EVENT_MESSAGE);
+ switch_event_create(&event, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(event);
}
Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c Thu Oct 2 13:10:05 2008
@@ -1504,7 +1504,7 @@
header_string = switch_core_session_sprintf(session, "%s\nX-Voicemail-Length: %u", headers, message_len);
- if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&event, SWITCH_EVENT_GENERAL) == SWITCH_STATUS_SUCCESS) {
/* this isnt done? it was in the other place
* switch_channel_event_set_data(channel, event);
*/
@@ -1927,7 +1927,7 @@
int ok = 1;
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_GENERAL);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "mailbox", myid);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "destination_number", caller_profile->destination_number);
@@ -2097,7 +2097,7 @@
}
if (params) {
- switch_event_create(&local_event, SWITCH_EVENT_MESSAGE);
+ switch_event_create(&local_event, SWITCH_EVENT_REQUEST_PARAMS);
params = local_event;
}
@@ -2440,7 +2440,7 @@
switch_event_t *my_params = NULL;
switch_xml_t ut;
- switch_event_create(&my_params, SWITCH_EVENT_MESSAGE);
+ switch_event_create(&my_params, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(my_params);
switch_event_add_header_string(my_params, SWITCH_STACK_BOTTOM, "domain", domain);
switch_event_add_header_string(my_params, SWITCH_STACK_BOTTOM, "purpose", "publish-vm");
@@ -2458,7 +2458,7 @@
if (!isall && !istag) {
if ((ut = switch_xml_find_child(x_domain, "user", "id", user))) {
- switch_event_create(&my_params, SWITCH_EVENT_MESSAGE);
+ switch_event_create(&my_params, SWITCH_EVENT_REQUEST_PARAMS);
status = deliver_vm(profile, ut, domain, path, 0, "B", my_params, pool, cid_name, cid_num, SWITCH_TRUE);
switch_event_destroy(&my_params);
} else {
@@ -2469,7 +2469,7 @@
const char *tag;
if (isall || (istag && (tag=switch_xml_attr(ut, "vm-tag")) && !strcasecmp(tag, user))) {
- switch_event_create(&my_params, SWITCH_EVENT_MESSAGE);
+ switch_event_create(&my_params, SWITCH_EVENT_REQUEST_PARAMS);
status = deliver_vm(profile, ut, domain, path, 0, "B", my_params, pool, cid_name, cid_num, SWITCH_TRUE);
switch_event_destroy(&my_params);
}
@@ -2546,7 +2546,7 @@
switch_event_t *params = NULL;
const char *email_addr = NULL;
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "mailbox", id);
Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
==============================================================================
--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c (original)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c Thu Oct 2 13:10:05 2008
@@ -201,7 +201,7 @@
switch_status_t status = SWITCH_STATUS_GENERR;
switch_event_t *params = NULL;
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(params);
switch_channel_event_set_data(channel, params);
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Thu Oct 2 13:10:05 2008
@@ -2267,7 +2267,7 @@
goto end;
}
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(params);
switch_event_add_header(params, SWITCH_STACK_BOTTOM, "to", "%s@%s", to_user, to_host);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "from", from);
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Thu Oct 2 13:10:05 2008
@@ -999,7 +999,7 @@
switch_event_t *params = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "profile", profile->name);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "reconfig", "true");
@@ -1346,7 +1346,7 @@
return status;
}
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "profile", profile_name);
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Thu Oct 2 13:10:05 2008
@@ -1251,7 +1251,7 @@
free(sql);
}
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "action", "sip_auth");
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_profile", profile->name);
@@ -1420,7 +1420,7 @@
if (first && ret == AUTH_OK) {
if (v_event) {
- switch_event_create(v_event, SWITCH_EVENT_MESSAGE);
+ switch_event_create(v_event, SWITCH_EVENT_REQUEST_PARAMS);
}
if (v_event && *v_event) {
switch_xml_t xparams[2];
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c Thu Oct 2 13:10:05 2008
@@ -199,7 +199,7 @@
if (globals.debug) {
switch_event_t *event;
- if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
char *buf;
switch_channel_event_set_data(channel, event);
switch_event_serialize(event, &buf, SWITCH_FALSE);
Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c Thu Oct 2 13:10:05 2008
@@ -467,7 +467,7 @@
}
count++;
if (count == 1) {
- switch_event_create(event, SWITCH_EVENT_MESSAGE);
+ switch_event_create(event, SWITCH_EVENT_COMMAND);
switch_event_add_header(*event, SWITCH_STACK_BOTTOM, "Command", "%s", mbuf);
} else if (cur) {
char *var, *val;
@@ -1177,7 +1177,7 @@
goto done;
}
- if (switch_event_create(&call_event, SWITCH_EVENT_MESSAGE) != SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&call_event, SWITCH_EVENT_COMMAND) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
switch_clear_flag_locked(listener, LFLAG_RUNNING);
goto done;
Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c (original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c Thu Oct 2 13:10:05 2008
@@ -202,7 +202,7 @@
goto authed;
}
- switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
+ switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "mailbox", "check");
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Thu Oct 2 13:10:05 2008
@@ -200,7 +200,7 @@
return SWITCH_STATUS_MEMERR;
}
- switch_event_create(&(*channel)->variables, SWITCH_EVENT_MESSAGE);
+ switch_event_create(&(*channel)->variables, SWITCH_EVENT_GENERAL);
switch_core_hash_init(&(*channel)->private_hash, pool);
switch_queue_create(&(*channel)->dtmf_queue, 128, pool);
@@ -1134,7 +1134,9 @@
event->event_id == SWITCH_EVENT_CHANNEL_ANSWER ||
event->event_id == SWITCH_EVENT_CHANNEL_PROGRESS ||
event->event_id == SWITCH_EVENT_CHANNEL_PROGRESS_MEDIA ||
- event->event_id == SWITCH_EVENT_CHANNEL_HANGUP
+ event->event_id == SWITCH_EVENT_CHANNEL_HANGUP ||
+ event->event_id == SWITCH_EVENT_REQUEST_PARAMS ||
+ event->event_id == SWITCH_EVENT_CHANNEL_DATA
) {
/* Index Caller's Profile */
Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c (original)
+++ freeswitch/trunk/src/switch_core.c Thu Oct 2 13:10:05 2008
@@ -876,7 +876,7 @@
switch_xml_t x_domain, xml_root;
switch_xml_t ut;
- switch_event_create(&my_params, SWITCH_EVENT_MESSAGE);
+ switch_event_create(&my_params, SWITCH_EVENT_GENERAL);
switch_assert(my_params);
switch_event_add_header_string(my_params, SWITCH_STACK_BOTTOM, "domain", domain);
switch_event_add_header_string(my_params, SWITCH_STACK_BOTTOM, "purpose", "network-list");
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Thu Oct 2 13:10:05 2008
@@ -797,7 +797,7 @@
switch_set_flag(session, SSF_DESTROYED);
if ((val = switch_channel_get_variable(session->channel, "memory_debug")) && switch_true(val)) {
- if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&event, SWITCH_EVENT_GENERAL) == SWITCH_STATUS_SUCCESS) {
switch_channel_event_set_data(session->channel, event);
switch_event_serialize(event, &event_str, SWITCH_FALSE);
switch_assert(event_str);
Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c (original)
+++ freeswitch/trunk/src/switch_event.c Thu Oct 2 13:10:05 2008
@@ -161,6 +161,10 @@
"NOTIFY",
"SEND_MESSAGE",
"RECV_MESSAGE",
+ "REQUEST_PARAMS",
+ "CHANNEL_DATA",
+ "GENERAL",
+ "COMMAND",
"ALL"
};
Modified: freeswitch/trunk/src/switch_ivr_async.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_async.c (original)
+++ freeswitch/trunk/src/switch_ivr_async.c Thu Oct 2 13:10:05 2008
@@ -1232,7 +1232,7 @@
cont->list[i].up = 0;
if (cont->list[i].app) {
- if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-command", "execute");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-name", cont->list[i].app);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-arg", cont->list[i].data);
@@ -2068,7 +2068,7 @@
if ((flags & SMF_ECHO_BLEG) && (other_uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))
&& (other_session = switch_core_session_locate(other_uuid))) {
- if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-command", "execute");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-name", app);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-arg", path);
@@ -2090,7 +2090,7 @@
}
if ((flags & SMF_ECHO_ALEG)) {
- if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-command", "execute");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-name", app);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-arg", path);
@@ -2109,7 +2109,7 @@
}
if (nomedia) {
- if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-command", "nomedia");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "nomedia-uuid", uuid);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event-lock", "true");
@@ -2118,7 +2118,7 @@
}
if (cause) {
- if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-command", "execute");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-name", "hangup");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-arg", cause);
Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c (original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c Thu Oct 2 13:10:05 2008
@@ -274,7 +274,7 @@
status = input_callback(session_a, event, SWITCH_INPUT_TYPE_EVENT, user_data, 0);
}
- if (event->event_id != SWITCH_EVENT_MESSAGE || switch_core_session_receive_event(session_b, &event) != SWITCH_STATUS_SUCCESS) {
+ if (event->event_id != SWITCH_EVENT_COMMAND || switch_core_session_receive_event(session_b, &event) != SWITCH_STATUS_SUCCESS) {
switch_event_destroy(&event);
}
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Thu Oct 2 13:10:05 2008
@@ -596,7 +596,7 @@
so we will normalize dialstring params and channel variables (when there is an originator) into an event that we
will use as a pseudo hash to consult for params as needed.
*/
- if (switch_event_create(&var_event, SWITCH_EVENT_MESSAGE) != SWITCH_STATUS_SUCCESS) {
+ if (switch_event_create(&var_event, SWITCH_EVENT_GENERAL) != SWITCH_STATUS_SUCCESS) {
abort();
}
Modified: freeswitch/trunk/src/switch_ivr_play_say.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_play_say.c (original)
+++ freeswitch/trunk/src/switch_ivr_play_say.c Thu Oct 2 13:10:05 2008
@@ -121,7 +121,7 @@
module_name = chan_lang;
- switch_event_create(&hint_data, SWITCH_EVENT_MESSAGE);
+ switch_event_create(&hint_data, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(hint_data);
switch_event_add_header_string(hint_data, SWITCH_STACK_BOTTOM, "macro_name", macro_name);
Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c (original)
+++ freeswitch/trunk/src/switch_xml.c Thu Oct 2 13:10:05 2008
@@ -1437,7 +1437,7 @@
*domain = NULL;
if (!params) {
- switch_event_create(&my_params, SWITCH_EVENT_MESSAGE);
+ switch_event_create(&my_params, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(my_params);
switch_event_add_header_string(my_params, SWITCH_STACK_BOTTOM, "domain", domain_name);
params = my_params;
@@ -1467,7 +1467,7 @@
*domain = NULL;
if (!params) {
- switch_event_create(&my_params, SWITCH_EVENT_MESSAGE);
+ switch_event_create(&my_params, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(my_params);
params = my_params;
}
More information about the Freeswitch-svn
mailing list