making private events fire (please test)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4327 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2007-02-19 21:06:27 +00:00
parent d0cda3c757
commit 5e4396a46e
4 changed files with 6 additions and 1 deletions

View File

@ -746,6 +746,7 @@ typedef enum {
SWITCH_EVENT_CODEC - Codec Change
SWITCH_EVENT_BACKGROUND_JOB - Background Job
SWITCH_EVENT_DETECTED_SPEECH - Detected Speech
SWITCH_EVENT_PRIVATE_COMMAND - A private command event
SWITCH_EVENT_ALL - All events at once
</pre>
@ -785,6 +786,7 @@ typedef enum {
SWITCH_EVENT_CODEC,
SWITCH_EVENT_BACKGROUND_JOB,
SWITCH_EVENT_DETECTED_SPEECH,
SWITCH_EVENT_PRIVATE_COMMAND,
SWITCH_EVENT_ALL
} switch_event_types_t;

View File

@ -1909,6 +1909,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_queue_private_event(switch_c
}
if (session->private_event_queue) {
(*event)->event_id = SWITCH_EVENT_PRIVATE_COMMAND;
if (switch_queue_trypush(session->private_event_queue, *event) == SWITCH_STATUS_SUCCESS) {
*event = NULL;
switch_core_session_kill_channel(session, SWITCH_SIG_BREAK);

View File

@ -130,6 +130,7 @@ static char *EVENT_NAMES[] = {
"CODEC",
"BACKGROUND_JOB",
"DETECTED_SPEECH",
"PRIVATE_COMMAND",
"ALL"
};

View File

@ -98,6 +98,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
unsigned long CMD_NOMEDIA = apr_hashfunc_default("nomedia", &hlen);
assert(channel != NULL);
assert(event != NULL);
if (switch_strlen_zero(cmd)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Command!\n");
@ -170,7 +171,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
if (switch_core_session_dequeue_private_event(session, &event) == SWITCH_STATUS_SUCCESS) {
switch_ivr_parse_event(session, event);
switch_event_destroy(&event);
switch_event_fire(&event);
}
if (switch_channel_has_dtmf(channel)) {