git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1372 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-05-05 16:03:15 +00:00
parent 9fbaceaa90
commit 2e0da1e8f7
6 changed files with 801 additions and 498 deletions
@@ -758,6 +758,13 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
}
payload = tech_pvt->read_frame.payload;
if (switch_rtp_has_dtmf(tech_pvt->rtp_session)) {
char dtmf[128];
switch_rtp_dequeue_dtmf(tech_pvt->rtp_session, dtmf, sizeof(dtmf));
switch_channel_queue_dtmf(channel, dtmf);
switch_set_flag(tech_pvt, TFLAG_DTMF);
}
if (switch_test_flag(tech_pvt, TFLAG_DTMF)) {
switch_clear_flag(tech_pvt, TFLAG_DTMF);
return SWITCH_STATUS_BREAK;
@@ -767,12 +774,6 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
tech_pvt->read_frame.datalen = tech_pvt->last_read ? tech_pvt->last_read : tech_pvt->read_codec.implementation->encoded_bytes_per_frame;
}
if (switch_rtp_has_dtmf(tech_pvt->rtp_session)) {
char dtmf[128];
switch_rtp_dequeue_dtmf(tech_pvt->rtp_session, dtmf, sizeof(dtmf));
switch_channel_queue_dtmf(channel, dtmf);
}
if (tech_pvt->read_frame.datalen > 0) {
bytes = tech_pvt->read_codec.implementation->encoded_bytes_per_frame;
frames = (tech_pvt->read_frame.datalen / bytes);