]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4853
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 21 Nov 2012 15:57:13 +0000 (09:57 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 21 Nov 2012 15:57:13 +0000 (09:57 -0600)
src/switch_ivr.c

index 18329714aaa202f779513109371d2e0373fc4d77..dd5055351cf93d94c9fc00ef7277a4baa3173609 100644 (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;
 }