diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index fa67b6bb06..5e4afb7c07 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -913,6 +913,20 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt) uint8_t vad_out = switch_test_flag(tech_pvt, TFLAG_VAD_OUT) ? 1 : 0; uint8_t inb = switch_test_flag(tech_pvt, TFLAG_OUTBOUND) ? 0 : 1; + if ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_enable_vad_in")) && switch_true(val)) { + vad_in = 1; + } + if ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_enable_vad_out")) && switch_true(val)) { + vad_out = 1; + } + + if ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_disable_vad_in")) && switch_true(val)) { + vad_in = 0; + } + if ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_disable_vad_out")) && switch_true(val)) { + vad_out = 0; + } + tech_pvt->ssrc = switch_rtp_get_ssrc(tech_pvt->rtp_session); switch_set_flag_locked(tech_pvt, TFLAG_RTP); switch_set_flag_locked(tech_pvt, TFLAG_IO); diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 4996dc9010..c1204e812e 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1435,6 +1435,10 @@ static int rtp_common_write(switch_rtp_t *rtp_session, void *data, uint32_t data rtp_session->last_write_samplecount = rtp_session->timer.samplecount; } switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void *) send_msg, &bytes); + } else if (!fwd) { + /* nevermind save this seq inc for next time */ + rtp_session->seq--; + rtp_session->send_msg.header.seq = htons(rtp_session->seq); } if (rtp_session->ice_user) {