diff --git a/src/mod/endpoints/mod_iax/mod_iax.c b/src/mod/endpoints/mod_iax/mod_iax.c index e06157d475..c2e4364ca3 100644 --- a/src/mod/endpoints/mod_iax/mod_iax.c +++ b/src/mod/endpoints/mod_iax/mod_iax.c @@ -623,8 +623,9 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch return SWITCH_STATUS_FALSE; } - switch_core_timer_next(&tech_pvt->timer); - + if (!switch_queue_size(tech_pvt->frame_queue)) { + switch_core_timer_next(&tech_pvt->timer); + } if (switch_queue_trypop(tech_pvt->frame_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) { if (tech_pvt->read_frame) { diff --git a/src/mod/endpoints/mod_loopback/mod_loopback.c b/src/mod/endpoints/mod_loopback/mod_loopback.c index 49731e7b5d..c1245b14bf 100644 --- a/src/mod/endpoints/mod_loopback/mod_loopback.c +++ b/src/mod/endpoints/mod_loopback/mod_loopback.c @@ -548,8 +548,10 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch goto end; } - - switch_core_timer_next(&tech_pvt->timer); + if (!switch_queue_size(tech_pvt->frame_queue)) { + switch_core_timer_next(&tech_pvt->timer); + } + if (switch_queue_trypop(tech_pvt->frame_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) { if (tech_pvt->write_frame) { switch_frame_free(&tech_pvt->write_frame);