SWITCH_MESSAGE_INDICATE_BLIND_TRANSFER_RESPONSE,
SWITCH_MESSAGE_INDICATE_STUN_ERROR,
SWITCH_MESSAGE_INDICATE_MEDIA_RENEG,
+ SWITCH_MESSAGE_ANSWER_EVENT,
+ SWITCH_MESSAGE_PROGRESS_EVENT,
+ SWITCH_MESSAGE_RING_EVENT,
SWITCH_MESSAGE_INVALID
} switch_core_session_message_types_t;
return channel->state;
}
+static switch_status_t send_ind(switch_channel_t *channel, switch_core_session_message_types_t msg_id, const char *file, const char *func, int line)
+{
+ switch_core_session_message_t msg = { 0 };
+
+ msg.message_id = msg_id;
+ msg.from = channel->name;
+ return switch_core_session_perform_receive_message(channel->session, &msg, file, func, line);
+}
+
+
SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_ring_ready_value(switch_channel_t *channel,
switch_ring_ready_t rv,
const char *file, const char *func, int line)
switch_channel_set_callstate(channel, CCS_RINGING);
+ send_ind(channel, SWITCH_MESSAGE_RING_EVENT, file, func, line);
+
return SWITCH_STATUS_SUCCESS;
}
switch_channel_set_callstate(channel, CCS_EARLY);
+ send_ind(channel, SWITCH_MESSAGE_PROGRESS_EVENT, file, func, line);
+
return SWITCH_STATUS_SUCCESS;
}
switch_channel_set_callstate(channel, CCS_ACTIVE);
+ send_ind(channel, SWITCH_MESSAGE_ANSWER_EVENT, file, func, line);
+
+
return SWITCH_STATUS_SUCCESS;
}