提交 76c0201e authored 作者: Anthony Minessale's avatar Anthony Minessale

dtmf tweak

上级 8f8a9a80
......@@ -3532,7 +3532,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
if (((val = switch_channel_get_variable(tech_pvt->channel, "rtp_digit_delay")))) {
int delayi = atoi(val);
if (delayi < 0) delayi = 0;
delay = (uint32_t) delay;
delay = (uint32_t) delayi;
}
......
......@@ -2300,6 +2300,7 @@ static void set_dtmf_delay(switch_rtp_t *rtp_session, uint32_t ms, uint32_t max_
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER)) {
rtp_session->max_next_write_samplecount = rtp_session->timer.samplecount + max_upsamp;
rtp_session->next_write_samplecount = rtp_session->timer.samplecount + upsamp;
rtp_session->last_write_ts += upsamp;
}
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Queue digit delay of %dms\n", ms);
......@@ -2349,7 +2350,7 @@ static void do_2833(switch_rtp_t *rtp_session, switch_core_session_t *session)
}
}
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Send %s packet for [%c] ts=%u dur=%d/%d/%d seq=%d lw=%d\n",
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Send %s packet for [%c] ts=%u dur=%d/%d/%d seq=%d lw=%u\n",
loops == 1 ? "middle" : "end", rtp_session->dtmf_data.out_digit,
rtp_session->dtmf_data.timestamp_dtmf,
rtp_session->dtmf_data.out_digit_sofar,
......@@ -4378,7 +4379,7 @@ SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session,
rtp_session->write_msg.header.seq = htons(++rtp_session->seq);
rtp_session->write_msg.header.ts = htonl(ts);
rtp_session->write_msg.header.pt = payload;
rtp_session->write_msg.header.m = (m && !(rtp_session->rtp_bugs & RTP_BUG_NEVER_SEND_MARKER)) ? 1 : 0;
rtp_session->write_msg.header.m = m;
memcpy(rtp_session->write_msg.body, data, datalen);
bytes = rtp_header_len + datalen;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论