Skip to content

[mod_spandsp] Fix T.38 fax hangup after Phase E completion - #3107

Open
fsliwenjie wants to merge 1 commit into
signalwire:masterfrom
fsliwenjie:fix-t38-fax-hangup
Open

[mod_spandsp] Fix T.38 fax hangup after Phase E completion#3107
fsliwenjie wants to merge 1 commit into
signalwire:masterfrom
fsliwenjie:fix-t38-fax-hangup

Conversation

@fsliwenjie

Copy link
Copy Markdown

Description

When a T.38 fax completes (Phase E), phase_e_handler() sets pvt->done = 1 to signal the main loop in mod_spandsp_fax_process_fax() to exit. However, in T.38/UDPTL mode the peer stops sending packets after completion, causing read_frame() to block in poll(). The main loop never reaches the pvt->done check and the call hangs until the media inactivity timeout (up to 600 seconds).

This fix calls switch_core_session_kill_channel(session, SWITCH_SIG_BREAK) after setting pvt->done = 1 to wake the blocked read_frame().

The same pvt->done = 1 pattern exists in mod_spandsp_fax_stop_fax(), which is also fixed to prevent the same hangup issue.

Type of Change

  • Bug fix

Related Issues

Closes #3044

Testing

When a T.38 fax completes (Phase E), phase_e_handler() sets pvt->done = 1
to signal the main loop to exit. However, in T.38/UDPTL mode the peer stops
sending packets after completion, causing read_frame() to block in poll().
The main loop never reaches the pvt->done check and the call hangs until
the media inactivity timeout (up to 600 seconds).

Fix: call switch_core_session_kill_channel(session, SWITCH_SIG_BREAK) after
setting pvt->done = 1 to wake the blocked read_frame().

The same pattern exists in mod_spandsp_fax_stop_fax(), which is also fixed.

Closes signalwire#3044
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[mod_spandsp] T.38 fax hangs after completion (Phase E) when peer stops sending UDPTL

1 participant