From b7e6f4ab8203f6fed897d9cb8bac62feff46e651 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 21 Nov 2012 09:57:13 -0600 Subject: [PATCH] FS-4853 --- src/switch_ivr.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 18329714aa..dd5055351c 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -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; }