提交 fc0f1624 authored 作者: Anthony Minessale's avatar Anthony Minessale

add t38_gateway_rx_fillin

上级 51aa0571
...@@ -1160,7 +1160,6 @@ void mod_spandsp_fax_process_fax(switch_core_session_t *session, const char *dat ...@@ -1160,7 +1160,6 @@ void mod_spandsp_fax_process_fax(switch_core_session_t *session, const char *dat
break; break;
} }
/* 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. /* 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. */ 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 ...@@ -1572,10 +1571,11 @@ static switch_status_t t38_gateway_on_consume_media(switch_core_session_t *sessi
goto end_unlock; goto end_unlock;
} }
if (switch_test_flag(read_frame, SFF_CNG)) {
/* Skip CNG frames (auto-generated by FreeSWITCH, usually) */ /* We have no real signal data for the FAX software, but we have a space in time if we have a CNG indication.
if (!switch_test_flag(read_frame, SFF_CNG)) { 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) { if (read_fd != FAX_INVALID_SOCKET) {
switch_ssize_t rv; switch_ssize_t rv;
do { rv = write(read_fd, read_frame->data, read_frame->datalen); } while (rv == -1 && errno == EINTR); do { rv = write(read_fd, read_frame->data, read_frame->datalen); } while (rv == -1 && errno == EINTR);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论