mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
better handling of negotiation errs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7707 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1390,9 +1390,11 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel
|
||||
msg.message_id = SWITCH_MESSAGE_INDICATE_PROGRESS;
|
||||
msg.from = channel->name;
|
||||
status = switch_core_session_receive_message(channel->session, &msg);
|
||||
|
||||
|
||||
if (status == SWITCH_STATUS_SUCCESS) {
|
||||
status = switch_channel_perform_mark_pre_answered(channel, file, func, line);
|
||||
switch_channel_perform_mark_pre_answered(channel, file, func, line);
|
||||
} else {
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
|
||||
}
|
||||
|
||||
return status;
|
||||
@@ -1423,6 +1425,8 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_ring_ready(switch_channel
|
||||
|
||||
if (status == SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_NOTICE, "Ring Ready %s!\n", channel->name);
|
||||
} else {
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
|
||||
}
|
||||
|
||||
return status;
|
||||
@@ -1487,17 +1491,17 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_answer(switch_channel_t *
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
msg.message_id = SWITCH_MESSAGE_INDICATE_ANSWER;
|
||||
msg.from = channel->name;
|
||||
status = switch_core_session_receive_message(channel->session, &msg);
|
||||
|
||||
if (status == SWITCH_STATUS_SUCCESS) {
|
||||
return switch_channel_perform_mark_answered(channel, file, func, line);
|
||||
switch_channel_perform_mark_answered(channel, file, func, line);
|
||||
} else {
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
#define resize(l) {\
|
||||
|
Reference in New Issue
Block a user