git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@881 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-03-21 00:20:24 +00:00
parent a688382c3c
commit bc69b89cf9
4 changed files with 39 additions and 3 deletions

View File

@@ -571,7 +571,12 @@ SWITCH_DECLARE(switch_status) switch_channel_pre_answer(switch_channel *channel)
char *uuid = switch_core_session_get_uuid(channel->session);
switch_status status;
assert(channel != NULL);
assert(channel != NULL);
if (channel->state >= CS_HANGUP) {
return SWITCH_STATUS_FALSE;
}
msg.message_id = SWITCH_MESSAGE_INDICATE_PROGRESS;
msg.from = channel->name;
status = switch_core_session_message_send(uuid, &msg);
@@ -588,6 +593,9 @@ SWITCH_DECLARE(switch_status) switch_channel_answer(switch_channel *channel)
{
assert(channel != NULL);
if (channel->state >= CS_HANGUP) {
return SWITCH_STATUS_FALSE;
}
if (switch_core_session_answer_channel(channel->session) == SWITCH_STATUS_SUCCESS) {
switch_event *event;