From fc0f16246a0d03b7fa16765d3be73923497f31c9 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 16 Jun 2010 11:49:13 -0500 Subject: [PATCH] add t38_gateway_rx_fillin --- src/mod/applications/mod_spandsp/mod_spandsp_fax.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_fax.c b/src/mod/applications/mod_spandsp/mod_spandsp_fax.c index ffde301d57..feaf3cc820 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp_fax.c +++ b/src/mod/applications/mod_spandsp/mod_spandsp_fax.c @@ -1160,7 +1160,6 @@ void mod_spandsp_fax_process_fax(switch_core_session_t *session, const char *dat break; } - /* Skip CNG frames (auto-generated by FreeSWITCH, usually) */ if (switch_test_flag(read_frame, SFF_CNG)) { /* We have no real signal data for the FAX software, but we have a space in time if we have a CNG indication. Do a fill-in operation in the FAX machine, to keep things rolling along. */ @@ -1572,10 +1571,11 @@ static switch_status_t t38_gateway_on_consume_media(switch_core_session_t *sessi goto end_unlock; } - - /* Skip CNG frames (auto-generated by FreeSWITCH, usually) */ - if (!switch_test_flag(read_frame, SFF_CNG)) { - + if (switch_test_flag(read_frame, SFF_CNG)) { + /* We have no real signal data for the FAX software, but we have a space in time if we have a CNG indication. + Do a fill-in operation in the FAX machine, to keep things rolling along. */ + t38_gateway_rx_fillin(pvt->t38_gateway_state, read_impl.samples_per_packet); + } else { if (read_fd != FAX_INVALID_SOCKET) { switch_ssize_t rv; do { rv = write(read_fd, read_frame->data, read_frame->datalen); } while (rv == -1 && errno == EINTR);