set control for vad from vars
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5364 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
7a66d1dd8a
commit
0c48210a75
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue