Functional Requirements
Use case 1:
In this use case, the calling endpoint is T.38 equipped and the called endpoint is not (supports T.30 only); in addition, the calling endpoint is properly configured to not initiate T.38 re-INVITEs itself, but relies on the receiving gateway (Asterisk+T.38 Gateway) to do so.
during call setup, called endpoint is ringing, gateway does nothing
when called endpoint has answered, gateway listens for FAX preamble (using V.21 detector) generated by called endpoint
if preamble is not detected after 15 seconds from call answer, gateway removes itself from the audio path (this may need to be optional)
if preamble is detected, gateway mutes audio path in both directions (generating silence towards both endpoints). gateway waits one second, then constructs T.38 negotiation request as a control frame, using parameters previously set via FAXOPT() dialplan function, and sends control frame to core
if T.38 negotiation fails (times out, or is rejected), gateway removes itself from the audio path (thus clearing the 'mute' state in both
directions)
if T.38 negotiation succeeds (request is accepted), gateway constructs T.38 session in FAX stack, feeds it negotiated parameters, and starts
session; if this fails, gateway causes channel(s) to be hung up and reports appropriate errors
while T.38 session is active, gateway receives T.38 media frames from calling endpoint and passes them to FAX stack; gateway receives T.38
media frames from FAX stack and sends them to calling endpoint. gateway also receives audio frames from called endpoint and passes them to FAX
stack, and receives audio frames from FAX stack and sends them to called endpoint
when T.38 session is complete, gateway sends T.38 negotiation request to revert to audio mode
if audio mode reversion fails, gateway causes channel(s) to be hung up
if audio mode reversion succeeds, gateway removes itself from audio path
Use case 2:
In this use case, the calling endpoint is T.38 equipped and the called endpoint is not (supports T.30 only); in addition, the calling endpoint
is improperly configured to initiate T.38 re-INVITEs itself, not waiting for the receiving gateway to do so.
during call setup, called endpoint is ringing, gateway does nothing
when called endpoint has answered, gateway listens for FAX preamble (using V.21 detector) generated by called endpoint
if preamble is not detected after 15 seconds from call answer, gateway removes itself from the audio path (this may need to be optional)
if preamble is detected, gateway mutes audio path in both directions (generating silence towards both endpoints). gateway waits one second,
and during this time a T.38 negotiation request is received from the calling endpoint; gateway processes this request using parameters
previously set using FAXOPT() dialplan function
if the T.38 negotiation request cannot be accepted, gateway sends a T.38 negotiation failure response, and removes itself from the audio path
(thus clearing the 'mute' state in both directions)
if T.38 negotiation succeeds (request can be accepted), gateway sends a T.38 negotiation success response, constructs T.38 session in FAX stack,
feeds it negotiated parameters, and starts session; if this fails, gateway causes channel(s) to be hung up and reports appropriate errors
while T.38 session is active, gateway receives T.38 media frames from calling endpoint and passes them to FAX stack; gateway receives T.38 media frames from FAX stack and sends them to calling endpoint. gateway also receives audio frames from called endpoint and passes them to FAX
stack, and receives audio frames from FAX stack and sends them to called endpoint
when T.38 session is complete, gateway sends T.38 negotiation request to revert to audio mode (this may be received from calling endpoint first,
though)
if audio mode reversion fails, gateway causes channel(s) to be hung up
if audio mode reversion succeeds, gateway removes itself from audio path
Use case 3:
In this use case, the calling endpoint is not T.38 equipped but the called endpoint is. In addition, the called endpoint is improperly configured to rely on the calling endpoint to initiate T.38 re-INVITEs.
during call setup, called endpoint is ringing, gateway does nothing
when called endpoint has answered, gateway listens for FAX preamble (using V.21 detector) generated by called endpoint
if preamble is not detected after 15 seconds from call answer, gateway removes itself from the audio path (this may need to be optional)
if preamble is detected, gateway mutes audio path in both directions (generating silence towards both endpoints). gateway waits one second, then constructs T.38 negotiation request as a control frame, using parameters previously set via FAXOPT() dialplan function, and sends control frame to called endpoint
if T.38 negotiation fails (times out, or is rejected), gateway removes itself from the audio path (thus clearing the 'mute' state in both
directions)
if T.38 negotiation succeeds (request is accepted), gateway constructs T.38 session in FAX stack, feeds it negotiated parameters, and starts
session; if this fails, gateway causes channel(s) to be hung up and reports appropriate errors
while T.38 session is active, gateway receives T.38 media frames from called endpoint and passes them to FAX stack; gateway receives T.38
media frames from FAX stack and sends them to called endpoint. gateway also receives audio frames from calling endpoint and passes them to FAX
stack, and receives audio frames from FAX stack and sends them to calling endpoint
when T.38 session is complete, gateway sends T.38 negotiation request to revert to audio mode
if audio mode reversion fails, gateway causes channel(s) to be hung up
if audio mode reversion succeeds, gateway removes itself from audio path
Use case 4:
In this use case, the calling endpoint is not T.38 equipped but the called endpoint is. In addition, the called endpoint is properly configured to initiate T.38 re-INVITEs itself.
during call setup, called endpoint is ringing, gateway does nothing
when called endpoint has answered, gateway listens for FAX preamble (using V.21 detector) generated by called endpoint
if preamble is not detected after 15 seconds from call answer, gateway removes itself from the audio path (this may need to be optional)
if preamble is detected, gateway mutes audio path in both directions (generating silence towards both endpoints). gateway waits one second, and during this time a T.38 negotiation request is received from the called endpoint; gateway processes this request using parameters previously set using FAXOPT() dialplan function
if the T.38 negotiation request cannot be accepted, gateway sends a T.38 negotiation failure response, and removes itself from the audio path
(thus clearing the 'mute' state in both directions)
if T.38 negotiation succeeds (request can be accepted), gateway sends a T.38 negotiation success response, constructs T.38 session in FAX stack,
feeds it negotiated parameters, and starts session; if this fails, gateway causes channel(s) to be hung up and reports appropriate errors
while T.38 session is active, gateway receives T.38 media frames from called endpoint and passes them to FAX stack; gateway receives T.38
media frames from FAX stack and sends them to called endpoint. gateway also receives audio frames from calling endpoint and passes them to FAX
stack, and receives audio frames from FAX stack and sends them to calling endpoint
when T.38 session is complete, gateway sends T.38 negotiation request to revert to audio mode
if audio mode reversion fails, gateway causes channel(s) to be hung up
if audio mode reversion succeeds, gateway removes itself from audio path