This commit is contained in:
Anthony Minessale 2012-11-21 09:57:13 -06:00
parent 624b49f2a3
commit b7e6f4ab82
1 changed files with 12 additions and 0 deletions

View File

@ -1390,6 +1390,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_hold(switch_core_session_t *session,
switch_channel_t *channel = switch_core_session_get_channel(session);
const char *stream;
const char *other_uuid;
switch_event_t *event;
msg.message_id = SWITCH_MESSAGE_INDICATE_HOLD;
msg.string_arg = message;
@ -1406,6 +1407,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_hold(switch_core_session_t *session,
}
}
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_HOLD) == SWITCH_STATUS_SUCCESS) {
switch_channel_event_set_data(channel, event);
switch_event_fire(&event);
}
return SWITCH_STATUS_SUCCESS;
}
@ -1428,6 +1434,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_unhold(switch_core_session_t *session
switch_channel_t *channel = switch_core_session_get_channel(session);
const char *other_uuid;
switch_core_session_t *b_session;
switch_event_t *event;
msg.message_id = SWITCH_MESSAGE_INDICATE_UNHOLD;
msg.from = __FILE__;
@ -1446,6 +1453,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_unhold(switch_core_session_t *session
}
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_UNHOLD) == SWITCH_STATUS_SUCCESS) {
switch_channel_event_set_data(channel, event);
switch_event_fire(&event);
}
return SWITCH_STATUS_SUCCESS;
}