mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
FSCORE-274
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11315 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
dc8762b02a
commit
f71c5ae4c3
@ -1455,7 +1455,7 @@ static switch_status_t answer_call(char **argv, int argc, switch_stream_handle_t
|
|||||||
} else {
|
} else {
|
||||||
switch_channel_t *channel = switch_core_session_get_channel(tp->session);
|
switch_channel_t *channel = switch_core_session_get_channel(tp->session);
|
||||||
switch_set_flag_locked(tp, TFLAG_ANSWER);
|
switch_set_flag_locked(tp, TFLAG_ANSWER);
|
||||||
switch_channel_answer(channel);
|
switch_channel_mark_answered(channel);
|
||||||
add_pvt(tp, PA_MASTER);
|
add_pvt(tp, PA_MASTER);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1469,7 +1469,7 @@ static switch_status_t answer_call(char **argv, int argc, switch_stream_handle_t
|
|||||||
if (!switch_test_flag(tp, TFLAG_ANSWER)) {
|
if (!switch_test_flag(tp, TFLAG_ANSWER)) {
|
||||||
switch_channel_t *channel = switch_core_session_get_channel(tp->session);
|
switch_channel_t *channel = switch_core_session_get_channel(tp->session);
|
||||||
switch_set_flag_locked(tp, TFLAG_ANSWER);
|
switch_set_flag_locked(tp, TFLAG_ANSWER);
|
||||||
switch_channel_answer(channel);
|
switch_channel_mark_answered(channel);
|
||||||
add_pvt(tp, PA_MASTER);
|
add_pvt(tp, PA_MASTER);
|
||||||
x++;
|
x++;
|
||||||
break;
|
break;
|
||||||
|
@ -1633,7 +1633,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_
|
|||||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel_t *channel, const char *file, const char *func, int line)
|
SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel_t *channel, const char *file, const char *func, int line)
|
||||||
{
|
{
|
||||||
switch_core_session_message_t msg;
|
switch_core_session_message_t msg;
|
||||||
switch_status_t status;
|
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
switch_assert(channel != NULL);
|
switch_assert(channel != NULL);
|
||||||
|
|
||||||
@ -1649,13 +1649,11 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel
|
|||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
|
if (!switch_channel_test_flag(channel, CF_OUTBOUND)) {
|
||||||
return SWITCH_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg.message_id = SWITCH_MESSAGE_INDICATE_PROGRESS;
|
msg.message_id = SWITCH_MESSAGE_INDICATE_PROGRESS;
|
||||||
msg.from = channel->name;
|
msg.from = channel->name;
|
||||||
status = switch_core_session_perform_receive_message(channel->session, &msg, file, func, line);
|
status = switch_core_session_perform_receive_message(channel->session, &msg, file, func, line);
|
||||||
|
}
|
||||||
|
|
||||||
if (status == SWITCH_STATUS_SUCCESS) {
|
if (status == SWITCH_STATUS_SUCCESS) {
|
||||||
switch_channel_perform_mark_pre_answered(channel, file, func, line);
|
switch_channel_perform_mark_pre_answered(channel, file, func, line);
|
||||||
@ -1669,7 +1667,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel
|
|||||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_ring_ready(switch_channel_t *channel, const char *file, const char *func, int line)
|
SWITCH_DECLARE(switch_status_t) switch_channel_perform_ring_ready(switch_channel_t *channel, const char *file, const char *func, int line)
|
||||||
{
|
{
|
||||||
switch_core_session_message_t msg;
|
switch_core_session_message_t msg;
|
||||||
switch_status_t status;
|
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
switch_assert(channel != NULL);
|
switch_assert(channel != NULL);
|
||||||
|
|
||||||
@ -1685,13 +1683,11 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_ring_ready(switch_channel
|
|||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
|
if (!switch_channel_test_flag(channel, CF_OUTBOUND)) {
|
||||||
return SWITCH_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg.message_id = SWITCH_MESSAGE_INDICATE_RINGING;
|
msg.message_id = SWITCH_MESSAGE_INDICATE_RINGING;
|
||||||
msg.from = channel->name;
|
msg.from = channel->name;
|
||||||
status = switch_core_session_perform_receive_message(channel->session, &msg, file, func, line);
|
status = switch_core_session_perform_receive_message(channel->session, &msg, file, func, line);
|
||||||
|
}
|
||||||
|
|
||||||
if (status == SWITCH_STATUS_SUCCESS) {
|
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);
|
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_NOTICE, "Ring Ready %s!\n", channel->name);
|
||||||
@ -1782,7 +1778,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_chan
|
|||||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_answer(switch_channel_t *channel, const char *file, const char *func, int line)
|
SWITCH_DECLARE(switch_status_t) switch_channel_perform_answer(switch_channel_t *channel, const char *file, const char *func, int line)
|
||||||
{
|
{
|
||||||
switch_core_session_message_t msg;
|
switch_core_session_message_t msg;
|
||||||
switch_status_t status;
|
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
switch_assert(channel != NULL);
|
switch_assert(channel != NULL);
|
||||||
|
|
||||||
@ -1794,13 +1790,11 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_answer(switch_channel_t *
|
|||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
|
if (!switch_channel_test_flag(channel, CF_OUTBOUND)) {
|
||||||
return SWITCH_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg.message_id = SWITCH_MESSAGE_INDICATE_ANSWER;
|
msg.message_id = SWITCH_MESSAGE_INDICATE_ANSWER;
|
||||||
msg.from = channel->name;
|
msg.from = channel->name;
|
||||||
status = switch_core_session_perform_receive_message(channel->session, &msg, file, func, line);
|
status = switch_core_session_perform_receive_message(channel->session, &msg, file, func, line);
|
||||||
|
}
|
||||||
|
|
||||||
if (status == SWITCH_STATUS_SUCCESS) {
|
if (status == SWITCH_STATUS_SUCCESS) {
|
||||||
switch_channel_perform_mark_answered(channel, file, func, line);
|
switch_channel_perform_mark_answered(channel, file, func, line);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user