提交 07c6022e authored 作者: Anthony Minessale's avatar Anthony Minessale

add loopback_bowout variable (set to false to skip auto-bowout)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13162 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 6cdb09dd
...@@ -640,10 +640,15 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc ...@@ -640,10 +640,15 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
) { ) {
const char *a_uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE); const char *a_uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
const char *b_uuid = switch_channel_get_variable(tech_pvt->other_channel, SWITCH_SIGNAL_BOND_VARIABLE); const char *b_uuid = switch_channel_get_variable(tech_pvt->other_channel, SWITCH_SIGNAL_BOND_VARIABLE);
const char *vetoa, *vetob;
switch_set_flag_locked(tech_pvt, TFLAG_BOWOUT); switch_set_flag_locked(tech_pvt, TFLAG_BOWOUT);
switch_set_flag_locked(tech_pvt->other_tech_pvt, TFLAG_BOWOUT); switch_set_flag_locked(tech_pvt->other_tech_pvt, TFLAG_BOWOUT);
vetoa = switch_channel_get_variable(tech_pvt->channel, "loopback_bowout");
vetob = switch_channel_get_variable(tech_pvt->other_tech_pvt->channel, "loopback_bowout");
if ((!vetoa || switch_true(vetoa)) && (!vetob || switch_true(vetob))) {
switch_clear_flag_locked(tech_pvt, TFLAG_WRITE); switch_clear_flag_locked(tech_pvt, TFLAG_WRITE);
switch_clear_flag_locked(tech_pvt->other_tech_pvt, TFLAG_WRITE); switch_clear_flag_locked(tech_pvt->other_tech_pvt, TFLAG_WRITE);
...@@ -657,6 +662,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc ...@@ -657,6 +662,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
} }
}
if (switch_test_flag(tech_pvt, TFLAG_LINKED)) { if (switch_test_flag(tech_pvt, TFLAG_LINKED)) {
switch_frame_t *clone; switch_frame_t *clone;
...@@ -675,9 +681,10 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc ...@@ -675,9 +681,10 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
if (switch_queue_trypush(tech_pvt->other_tech_pvt->frame_queue, clone) != SWITCH_STATUS_SUCCESS) { if (switch_queue_trypush(tech_pvt->other_tech_pvt->frame_queue, clone) != SWITCH_STATUS_SUCCESS) {
switch_frame_free(&clone); switch_frame_free(&clone);
} }
}
switch_set_flag_locked(tech_pvt->other_tech_pvt, TFLAG_WRITE); switch_set_flag_locked(tech_pvt->other_tech_pvt, TFLAG_WRITE);
}
status = SWITCH_STATUS_SUCCESS; status = SWITCH_STATUS_SUCCESS;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论