mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
only pass 2833 while bridged and while bridged to another channel that uses our RTP stack
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13131 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1024,11 +1024,20 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
|
||||
case SWITCH_MESSAGE_INDICATE_BRIDGE:
|
||||
if (switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_PASS_RFC2833) && switch_channel_test_flag_partner(channel, CF_FS_RTP)) {
|
||||
switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_PASS_RFC2833);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s activate passthru 2833 mode.\n", switch_channel_get_name(channel));
|
||||
}
|
||||
|
||||
rtp_flush_read_buffer(tech_pvt->rtp_session, SWITCH_RTP_FLUSH_STICK);
|
||||
}
|
||||
goto end;
|
||||
case SWITCH_MESSAGE_INDICATE_UNBRIDGE:
|
||||
if (switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||
if (switch_rtp_test_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_PASS_RFC2833)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s deactivate passthru 2833 mode.\n", switch_channel_get_name(channel));
|
||||
switch_rtp_clear_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_PASS_RFC2833);
|
||||
}
|
||||
rtp_flush_read_buffer(tech_pvt->rtp_session, SWITCH_RTP_FLUSH_UNSTICK);
|
||||
}
|
||||
goto end;
|
||||
|
||||
@@ -233,6 +233,7 @@ typedef enum {
|
||||
TFLAG_PROXY_MEDIA,
|
||||
TFLAG_HOLD_LOCK,
|
||||
TFLAG_3PCC_HAS_ACK,
|
||||
TFLAG_PASS_RFC2833,
|
||||
|
||||
/* No new flags below this line */
|
||||
TFLAG_MAX
|
||||
|
||||
@@ -2106,7 +2106,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
|
||||
if (sofia_test_pflag(tech_pvt->profile, PFLAG_PASS_RFC2833)
|
||||
|| ((val = switch_channel_get_variable(tech_pvt->channel, "pass_rfc2833")) && switch_true(val))) {
|
||||
flags |= SWITCH_RTP_FLAG_PASS_RFC2833;
|
||||
sofia_set_flag(tech_pvt, TFLAG_PASS_RFC2833);
|
||||
}
|
||||
|
||||
|
||||
@@ -2219,6 +2219,8 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
uint8_t vad_out = sofia_test_flag(tech_pvt, TFLAG_VAD_OUT) ? 1 : 0;
|
||||
uint8_t inb = sofia_test_flag(tech_pvt, TFLAG_OUTBOUND) ? 0 : 1;
|
||||
uint32_t stun_ping = 0;
|
||||
|
||||
switch_channel_set_flag(tech_pvt->channel, CF_FS_RTP);
|
||||
|
||||
if ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_enable_vad_in")) && switch_true(val)) {
|
||||
vad_in = 1;
|
||||
|
||||
Reference in New Issue
Block a user