put a 5 packet pause between digits so you can hear the spaces

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7223 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-01-14 21:51:31 +00:00
parent 7d95a056d2
commit becfca3704
2 changed files with 10 additions and 1 deletions

View File

@ -546,7 +546,7 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
tech_pvt = (private_object_t *) switch_core_session_get_private(session); tech_pvt = (private_object_t *) switch_core_session_get_private(session);
switch_assert(tech_pvt != NULL); switch_assert(tech_pvt != NULL);
if (!(tech_pvt->profile->pflags & PFLAG_RUNNING)) { if (0 && !(tech_pvt->profile->pflags & PFLAG_RUNNING)) {
switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_NORMAL_CLEARING); switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_NORMAL_CLEARING);
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} }

View File

@ -139,6 +139,7 @@ struct switch_rtp {
uint32_t ts; uint32_t ts;
uint32_t last_write_ts; uint32_t last_write_ts;
uint32_t last_write_samplecount; uint32_t last_write_samplecount;
uint32_t next_write_samplecount;
uint32_t flags; uint32_t flags;
switch_memory_pool_t *pool; switch_memory_pool_t *pool;
switch_sockaddr_t *from_addr; switch_sockaddr_t *from_addr;
@ -843,6 +844,7 @@ static void do_2833(switch_rtp_t *rtp_session)
if (rtp_session->timer.interval) { if (rtp_session->timer.interval) {
switch_core_timer_check(&rtp_session->timer); switch_core_timer_check(&rtp_session->timer);
rtp_session->last_write_samplecount = rtp_session->timer.samplecount; rtp_session->last_write_samplecount = rtp_session->timer.samplecount;
rtp_session->next_write_samplecount = rtp_session->timer.samplecount + samples * 5;
} }
rtp_session->dtmf_data.out_digit_dur = 0; rtp_session->dtmf_data.out_digit_dur = 0;
} }
@ -851,6 +853,13 @@ static void do_2833(switch_rtp_t *rtp_session)
if (!rtp_session->dtmf_data.out_digit_dur && rtp_session->dtmf_data.dtmf_queue && switch_queue_size(rtp_session->dtmf_data.dtmf_queue)) { if (!rtp_session->dtmf_data.out_digit_dur && rtp_session->dtmf_data.dtmf_queue && switch_queue_size(rtp_session->dtmf_data.dtmf_queue)) {
void *pop; void *pop;
if (rtp_session->timer.interval) {
switch_core_timer_check(&rtp_session->timer);
if (rtp_session->timer.samplecount < rtp_session->next_write_samplecount) {
return;
}
}
if (switch_queue_trypop(rtp_session->dtmf_data.dtmf_queue, &pop) == SWITCH_STATUS_SUCCESS) { if (switch_queue_trypop(rtp_session->dtmf_data.dtmf_queue, &pop) == SWITCH_STATUS_SUCCESS) {
switch_dtmf_t *rdigit = pop; switch_dtmf_t *rdigit = pop;
int64_t offset; int64_t offset;