This option enables the continuous streaming of FAX data, with no allowance for
FAX machine speeds. This is usually used with TCP/TPKT transmission of T.38 FAXes
Use relaxed timers for T.38. This is appropriate when using TCP/TPKT for T.38,
as there is no point in anything but a long backstop timeout in such a mode.
V.8 has been successfully negotiated. Note that this only means the V.8
message exchange has successfully completed. The actual exchanged parameters
must be checked, to see if the call can proceed properly.
\brief Insert the header or a field into an ADSI message.
\param s The ADSI transmit context.
\param msg The message buffer.
\param len The current length of the message.
\param field_type The type code for the new field.
\param field_body Pointer to the body of the new field.
\param field_len The length of the new field.
\brief Get a field from an ADSI message.
\param s The ADSI receive context.
\param msg The message buffer.
\param msg_len The length of the message.
\param pos Current position within the message. Set to -1 when starting a message.
\param field_type The type code for the field.
\param field_body Pointer to the body of the field.
\param field_len The length of the field, or -1 for no more fields, or -2 for message structure corrupt.
\brief Receive a chunk of ADSI audio.
\param s The ADSI receive context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of samples unprocessed.
Get the logging context associated with an ADSI receive context.
\brief Get the logging context associated with an ADSI receive context.
\param s The ADSI receive context.
\return A pointer to the logging context
\brief Initialise an ADSI receive context.
\param s The ADSI receive context.
\param standard The code for the ADSI standard to be used.
\param put_msg A callback routine called to deliver the received messages
to the application.
\param user_data An opaque pointer for the callback routine.
\return A pointer to the initialised context, or NULL if there was a problem.
\brief Generate a block of ADSI audio samples.
\param s The ADSI transmit context.
\param amp The audio sample buffer.
\param max_len The number of samples to be generated.
\return The number of samples actually generated.
Get the logging context associated with an ADSI transmit context.
\brief Get the logging context associated with an ADSI transmit context.
\param s The ADSI transmit context.
\return A pointer to the logging context
\brief Initialise an ADSI transmit context.
\param s The ADSI transmit context.
\param standard The code for the ADSI standard to be used.
\return A pointer to the initialised context, or NULL if there was a problem.
\brief Put a message into the input buffer of an ADSI transmit context.
\param s The ADSI transmit context.
\param msg The message.
\param len The length of the message.
\return The length actually added. If a message is already in progress
in the transmitter, this function will return zero, as it will
not successfully add the message to the buffer. If the message is
invalid (e.g. it is too long), this function will return -1.
\brief Adjust the preamble associated with an ADSI transmit context.
\param s The ADSI transmit context.
\param preamble_len The number of bits of preamble.
\param preamble_ones_len The number of bits of continuous one before a message.
\param postamble_ones_len The number of bits of continuous one after a message.
\param stop_bits The number of stop bits per character.
\brief Transcode from A-law to u-law, using the procedure defined in G.711.
\param alaw The A-law sample to transcode.
\return The best matching u-law value.
Initialise an asynchronous data receiver context.
\brief Initialise an asynchronous data receiver context.
\param s The receiver context.
\param data_bits The number of data bits.
\param parity The type of parity.
\param stop_bits The number of stop bits.
\param use_v14 True if V.14 rate adaption processing should be used.
\param put_byte The callback routine used to put the received data.
\param user_data An opaque pointer.
\return A pointer to the initialised context, or NULL if there was a problem.
Accept a bit from a received serial bit stream
\brief Accept a bit from a received serial bit stream
\param user_data An opaque point which must point to a receiver context.
\param bit The new bit. Some special values are supported for this field.
Get the next bit of a transmitted serial bit stream.
\brief Get the next bit of a transmitted serial bit stream.
\param user_data An opaque point which must point to a transmitter context.
\return the next bit, or a status value passed through from the routine which
gets the data bytes.
Initialise an asynchronous data transmit context.
\brief Initialise an asynchronous data transmit context.
\param s The transmitter context.
\param data_bits The number of data bit.
\param parity The type of parity.
\param stop_bits The number of stop bits.
\param use_v14 True if V.14 rate adaption processing should be used.
\param get_byte The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
\return A pointer to the initialised context, or NULL if there was a problem.
Set a minimum number of bit times of stop bit state before character transmission commences.
\brief Set a minimum number of bit times of stop bit state before character transmission commences.
\param user_data An opaque point which must point to a transmitter context.
\param the number of bits.
Initialise a BERT context.
\param s The BERT context.
\param limit The maximum test duration.
\param pattern One of the supported BERT signal patterns.
\param resync_len ???
\param resync_percent The percentage of bad bits which will cause a resync.
\return The BERT context.
Set the callback function for reporting the test status.
\param s The BERT context.
\param freq The required frequency of regular reports.
\param reporter The callback function.
\param user_data An opaque pointer passed to the reporter routine.
\brief Emit any residual bits to the output buffer, without actually flushing them.
This is useful for getting the buffer fully up to date, ready for things
like CRC calculations, while allowing bitstream_put() to be used to continue
the message later.
\param s A pointer to the bitstream context.
\param c A pointer to the bitstream output buffer.
\brief Get a chunk of bits from the input buffer.
\param s A pointer to the bitstream context.
\param c A pointer to the bitstream input buffer.
\param bits The number of bits of value to be grabbed. 1 to 25 bits is valid.
\return The value retrieved from the input buffer.
\brief Initialise a bitstream context.
\param s A pointer to the bitstream context.
\param lsb_first True if the bit stream is LSB first, else its MSB first.
\return A pointer to the bitstream context.
\brief Put a chunk of bits into the output buffer.
\param s A pointer to the bitstream context.
\param c A pointer to the bitstream output buffer.
\param value The value to be pushed into the output buffer.
\param bits The number of bits of value to be pushed. 1 to 25 bits is valid.
\brief Append an ITU/CCITT CRC-16 value to a frame.
\param buf The buffer containing the frame. This must be at least 2 bytes longer than
the frame it contains, to allow room for the CRC value.
\param len The length of the frame.
\return The new length of the frame.
\brief Calculate the ITU/CCITT CRC-16 value of some bits from a byte.
\param buf The buffer containing the byte of data.
\param len The number of bits, starting from the LSB.
\param crc The initial CRC value. This is usually 0xFFFF, or 0 for a new block (it depends on
the application). It is previous returned CRC value for the continuation of a block.
\return The CRC value.
\brief Calculate the ITU/CCITT CRC-16 value in buffer by whole bytes.
\param buf The buffer containing the data.
\param len The length of the frame.
\param crc The initial CRC value. This is usually 0xFFFF, or 0 for a new block (it depends on
the application). It is previous returned CRC value for the continuation of a block.
\return The CRC value.
\brief Check the ITU/CCITT CRC-16 value in a frame.
\param buf The buffer containing the frame.
\param len The length of the frame.
\return True if the CRC is OK, else false.
\brief Append an ITU/CCITT CRC-32 value to a frame.
\param buf The buffer containing the frame. This must be at least 2 bytes longer than
the frame it contains, to allow room for the CRC value.
\param len The length of the frame.
\return The new length of the frame.
\brief Calculate the ITU/CCITT CRC-32 value in buffer.
\param buf The buffer containing the data.
\param len The length of the frame.
\param crc The initial CRC value. This is usually 0xFFFFFFFF, or 0 for a new block (it depends on
the application). It is previous returned CRC value for the continuation of a block.
\return The CRC value.
\brief Check the ITU/CCITT CRC-32 value in a frame.
\param buf The buffer containing the frame.
\param len The length of the frame.
\return True if the CRC is OK, else false.
\brief Generate an integer tone sample.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\return The signal amplitude, between -32767 and 32767.
\brief Advance the phase, without returning any new signal sample.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\brief Advance the phase, without returning any new signal sample.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\brief Generate a complex floating point tone sample, with modulation.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\param scale The scaling factor.
\param phase The phase offset.
\return The complex signal amplitude, between (-1.0, -1.0) and (1.0, 1.0).
\brief Generate a complex floating point tone sample.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\return The complex signal amplitude, between (-1.0, -1.0) and (1.0, 1.0).
\brief Generate a complex integer tone sample.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
\brief Generate a complex 16 bit integer tone sample.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
\brief Generate a complex 32 bit integer tone sample.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
\brief Generate a complex 16bit integer tone sample, with modulation.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\param scale The scaling factor.
\param phase The phase offset.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
\brief Generate a complex 32 bit integer tone sample, with modulation.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\param scale The scaling factor.
\param phase The phase offset.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
\brief Generate a complex integer tone sample, with modulation.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\param scale The scaling factor.
\param phase The phase offset.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
\brief Lookup the complex value of a specified phase.
\param phase The phase accumulator value to be looked up.
\return The complex signal amplitude, between (-1.0, -1.0) and (1.0, 1.0).
\brief Lookup the complex integer value of a specified phase.
\param phase The phase accumulator value to be looked up.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
\brief Generate a complex 16 bit integer tone sample.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
\brief Generate a complex 32 bit integer tone sample.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
\brief Lookup the floating point value of a specified phase.
\param phase The phase accumulator value to be looked up.
\return The signal amplitude, between -1.0 and 1.0.
\brief Generate an integer tone sample, with modulation.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\param scale The scaling factor.
\param phase The phase offset.
\return The signal amplitude, between -32767 and 32767.
\brief Generate a floating point tone sample, with modulation.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\param scale The scaling factor.
\param phase The phase offset.
\return The signal amplitude, between -1.0 and 1.0.
\brief Find the amplitude for a particular phase offset from an accumulated phase.
\param phase_acc The accumulated phase.
\param phase_offset The phase offset.
\return The signal amplitude.
\brief Lookup the floating point value of a particular phase offset from an accumulated phase.
\param phase_acc The accumulated phase.
\param phase_offset The phase offset.
\return The signal amplitude.
\brief Find the phase rate value to achieve a particular frequency.
\param frequency The desired frequency, in Hz.
\return The phase rate which while achieve the desired frequency.
\brief Find the scaling factor needed to achieve a specified level in dBm0.
\param level The desired signal level, in dBm0.
\return The scaling factor.
\brief Find the scaling factor needed to achieve a specified level in dBmov.
\param level The desired signal level, in dBmov.
\return The scaling factor.
\brief Generate a floating point tone sample.
\param phase_acc A pointer to a phase accumulator value.
\param phase_rate The phase increment to be applied.
\return The signal amplitude, between -1.0 and 1.0.
Process a block of received DTMF audio samples.
\brief Process a block of received DTMF audio samples.
\param s The DTMF receiver context.
\param amp The audio sample buffer.
\param samples The number of samples in the buffer.
\return The number of samples unprocessed.
Fake processing of a missing block of received DTMF audio samples.
(e.g due to packet loss).
\brief Fake processing of a missing block of received DTMF audio samples.
\param s The DTMF receiver context.
\param len The number of samples to fake.
\return The number of samples unprocessed.
\brief Get a string of digits from a DTMF receiver’s output buffer.
\param s The DTMF receiver context.
\param digits The buffer for the received digits.
\param max The maximum number of digits to be returned,
\return The number of digits actually returned.
\brief Initialise a DTMF receiver context.
\param s The DTMF receiver context.
\param callback An optional callback routine, used to report received digits. If
no callback routine is set, digits may be collected, using the dtmf_rx_get()
function.
\param user_data An opaque pointer which is associated with the context,
and supplied in callbacks.
\return A pointer to the DTMF receiver context.
\brief Adjust a DTMF receiver context.
\param s The DTMF receiver context.
\param filter_dialtone True to enable filtering of dialtone, false
to disable, < 0 to leave unchanged.
\param twist Acceptable twist, in dB. < 0.0 to leave unchanged.
\param reverse_twist Acceptable reverse twist, in dB. < 0.0 to leave unchanged.
\param threshold The minimum acceptable tone level for detection, in dBm0.
<= -99.0 to leave unchanged.
Set a optional realtime callback for a DTMF receiver context. This function
is called immediately a confirmed state change occurs in the received DTMF. It
is called with the ASCII value for a DTMF tone pair, or zero to indicate no tone
is being received.
\brief Set a realtime callback for a DTMF receiver context.
\param s The DTMF receiver context.
\param callback Callback routine used to report the start and end of digits.
\param user_data An opaque pointer which is associated with the context,
and supplied in callbacks.
Get the status of DTMF detection during processing of the last audio
chunk.
\brief Get the status of DTMF detection during processing of the last
audio chunk.
\param s The DTMF receiver context.
\return The current digit status. Either ‘x’ for a “maybe” condition, or the
digit being detected.
\brief Generate a buffer of DTMF tones.
\param s The DTMF generator context.
\param amp The buffer for the generated signal.
\param max_samples The required number of generated samples.
\return The number of samples actually generated. This may be less than
max_samples if the input buffer empties.
\brief Initialise a DTMF tone generator context.
\param s The DTMF generator context.
\param callback An optional callback routine, used to get more digits.
\param user_data An opaque pointer which is associated with the context,
and supplied in callbacks.
\return A pointer to the DTMF generator context.
\brief Put a string of digits in a DTMF generator’s input buffer.
\param s The DTMF generator context.
\param digits The string of digits to be added.
\param len The length of the string of digits. If negative, the string is
assumed to be a NULL terminated string.
\return The number of digits actually added. This may be less than the
length of the digit string, if the buffer fills up.
\brief Change the transmit level for a DTMF tone generator context.
\param s The DTMF generator context.
\param level The level of the low tone, in dBm0.
\param twist The twist, in dB.
\brief Change the transmit on and off time for a DTMF tone generator context.
\param s The DTMF generator context.
\param on-time The on time, in ms.
\param off_time The off time, in ms.
Process to high pass filter the tx signal.
\param ec The echo canceller context.
\param tx The transmitted auio sample.
\return The HP filtered transmit sample, send this to your D/A.
Create a voice echo canceller context.
\param len The length of the canceller, in samples.
\return The new canceller context, or NULL if the canceller could not be created.
Process a sample through a voice echo canceller.
\param ec The echo canceller context.
\param tx The transmitted audio sample.
\param rx The received audio sample.
\return The clean (echo cancelled) received sample.
Get a pointer to the logging context associated with a FAX context.
\brief Get a pointer to the logging context associated with a FAX context.
\param s The FAX context.
\return A pointer to the logging context, or NULL.
Get a pointer to the T.30 engine associated with a FAX context.
\brief Get a pointer to the T.30 engine associated with a FAX context.
\param s The FAX context.
\return A pointer to the T.30 context, or NULL.
Initialise a FAX context.
\brief Initialise a FAX context.
\param s The FAX context.
\param calling_party True if the context is for a calling party. False if the
context is for an answering party.
\return A pointer to the FAX context, or NULL if there was a problem.
Convert a FAX modem type to a short text description.
\brief Convert a FAX modem type to a short text description.
\param modem The modem code.
\return A pointer to the description.
Get a pointer to the logging context associated with a FAX modems context.
\brief Get a pointer to the logging context associated with a FAX modems context.
\param s The FAX modems context.
\return A pointer to the logging context, or NULL.
Restart a FAX context.
\brief Restart a FAX context.
\param s The FAX context.
\param calling_party True if the context is for a calling party. False if the
context is for an answering party.
\return 0 for OK, else -1.
Apply T.30 receive processing to a block of audio samples.
\brief Apply T.30 receive processing to a block of audio samples.
\param s The FAX context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of samples unprocessed. This should only be non-zero if
the software has reached the end of the FAX call.
Apply fake T.30 receive processing when a block of audio samples is missing (e.g due
to packet loss).
\brief Apply fake T.30 receive processing.
\param s The FAX context.
\param len The number of samples to fake.
\return The number of samples unprocessed. This should only be non-zero if
the software has reached the end of the FAX call.
Select whether talker echo protection tone will be sent for the image modems.
\brief Select whether TEP will be sent for the image modems.
\param s The FAX context.
\param use_tep True if TEP should be sent.
Select whether silent audio will be sent when FAX transmit is idle.
\brief Select whether silent audio will be sent when FAX transmit is idle.
\param s The FAX context.
\param transmit_on_idle True if silent audio should be output when the FAX transmitter is
idle. False to transmit zero length audio when the FAX transmitter is idle. The default
behaviour is false.
Apply T.30 transmit processing to generate a block of audio samples.
\brief Apply T.30 transmit processing to generate a block of audio samples.
\param s The FAX context.
\param amp The audio sample buffer.
\param max_len The number of samples to be generated.
\return The number of samples actually generated. This will be zero when
there is nothing to send.
Process a block of received FSK modem audio samples.
\brief Process a block of received FSK modem audio samples.
\param s The modem context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of samples unprocessed.
Fake processing of a missing block of received FSK modem audio samples
(e.g due to packet loss).
\brief Fake processing of a missing block of received FSK modem audio samples.
\param s The modem context.
\param len The number of samples to fake.
\return The number of samples unprocessed.
Initialise an FSK modem receive context.
\brief Initialise an FSK modem receive context.
\param s The modem context.
\param spec The specification of the modem tones and rate.
\param framing_mode
\param put_bit The callback routine used to put the received data.
\param user_data An opaque pointer.
\return A pointer to the modem context, or NULL if there was a problem.
Set the framing parameters for a an FSK modem receive context in
FSK_FRAME_MODE_FRAMED mode.
\brief Set the framing parameters.
\param s The modem context.
\param data_bits;
\param parity;
\param stop_bits;
Change the modem status report function associated with an FSK modem receive context.
\brief Change the modem status report function associated with an FSK modem receive context.
\param s The modem context.
\param handler The callback routine used to report modem status changes.
\param user_data An opaque pointer.
Adjust an FSK modem receive context’s carrier detect power threshold.
\brief Adjust an FSK modem receive context’s carrier detect power threshold.
\param s The modem context.
\param cutoff The power level, in dBm0
Generate a block of FSK modem audio samples.
\brief Generate a block of FSK modem audio samples.
\param s The modem context.
\param amp The audio sample buffer.
\param len The number of samples to be generated.
\return The number of samples actually generated.
Initialise an FSK modem transmit context.
\brief Initialise an FSK modem transmit context.
\param s The modem context.
\param spec The specification of the modem tones and rate.
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
\return A pointer to the modem context, or NULL if there was a problem.
Adjust an FSK modem transmit context’s power output.
\brief Adjust an FSK modem transmit context’s power output.
\param s The modem context.
\param power The power level, in dBm0
Change the modem status report function associated with an FSK modem transmit context.
\brief Change the modem status report function associated with an FSK modem transmit context.
\param s The modem context.
\param handler The callback routine used to report modem status changes.
\param user_data An opaque pointer.
\brief Decode from u-law or A-law to linear.
\param s The G.711 context.
\param amp The linear audio buffer.
\param g711_data The G.711 data.
\param g711_bytes The number of G.711 samples to decode.
\return The number of samples of linear audio produced.
\brief Encode from linear to u-law or A-law.
\param s The G.711 context.
\param g711_data The G.711 data.
\param amp The linear audio buffer.
\param len The number of samples to encode.
\return The number of G.711 samples produced.
Initialise a G.711 encode or decode context.
\param s The G.711 context.
\param mode The G.711 mode.
\return A pointer to the G.711 context, or NULL for error.
\brief Transcode between u-law and A-law.
\param s The G.711 context.
\param g711_out The resulting G.711 data.
\param g711_in The original G.711 data.
\param g711_bytes The number of G.711 samples to transcode.
\return The number of G.711 samples produced.
Decode a buffer of G.722 data to linear PCM.
\param s The G.722 context.
\param amp The audio sample buffer.
\param g722_data
\param len
\return The number of samples returned.
Initialise an G.722 decode context.
\param s The G.722 decode context.
\param rate The bit rate of the G.722 data.
The valid rates are 64000, 56000 and 48000.
\param options
\return A pointer to the G.722 decode context, or NULL for error.
Encode a buffer of linear PCM data to G.722
\param s The G.722 context.
\param g722_data The G.722 data produced.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of bytes of G.722 data produced.
Initialise an G.722 encode context.
\param s The G.722 encode context.
\param rate The required bit rate for the G.722 data.
The valid rates are 64000, 56000 and 48000.
\param options
\return A pointer to the G.722 encode context, or NULL for error.
Decode a buffer of G.726 ADPCM data to linear PCM, a-law or u-law.
\param s The G.726 context.
\param amp The audio sample buffer.
\param g726_data
\param g726_bytes
\return The number of samples returned.
Encode a buffer of linear PCM data to G.726 ADPCM.
\param s The G.726 context.
\param g726_data The G.726 data produced.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of bytes of G.726 data produced.
Initialise a G.726 encode or decode context.
\param s The G.726 context.
\param bit_rate The required bit rate for the ADPCM data.
The valid rates are 16000, 24000, 32000 and 40000.
\param ext_coding The coding used outside G.726.
\param packing One of the G.726_PACKING_xxx options.
\return A pointer to the G.726 context, or NULL for error.
\brief Initialise the state of a Goertzel transform.
\param s The Goertzel context. If NULL, a context is allocated.
\param t The Goertzel descriptor.
\return A pointer to the Goertzel state.
\brief Update the state of a Goertzel transform.
\param s The Goertzel context.
\param amp The samples to be transformed.
\param samples The number of samples.
\return The number of samples unprocessed
Decode a buffer of GSM 06.10 data to linear PCM.
\param s The GSM 06.10 context.
\param amp The audio sample buffer.
\param code The GSM 06.10 data.
\param len The number of bytes of GSM 06.10 data to be decoded.
\return The number of samples returned.
Encode a buffer of linear PCM data to GSM 06.10.
\param s The GSM 06.10 context.
\param code The GSM 06.10 data produced.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of bytes of GSM 06.10 data produced.
Initialise a GSM 06.10 encode or decode context.
\param s The GSM 06.10 context
\param packing One of the GSM0610_PACKING_xxx options.
\return A pointer to the GSM 06.10 context, or NULL for error.
Pack a GSM 06.10 frames in the format used for VoIP.
\param c The buffer for the packed data. This must be at least 33 bytes long.
\param s A pointer to the frame to be packed.
\return The number of bytes generated.
Pack a pair of GSM 06.10 frames in the format used for wave files (wave type 49).
\param c The buffer for the packed data. This must be at least 65 bytes long.
\param s A pointer to the frames to be packed.
\return The number of bytes generated.
Set the packing format for a GSM 06.10 encode or decode context.
\param s The GSM 06.10 context
\param packing One of the GSM0610_PACKING_xxx options.
\return 0 for success, else -1.
Unpack a GSM 06.10 frame from the format used for VoIP.
\param s A pointer to a buffer into which the frame will be packed.
\param c The buffer containing the data to be unpacked. This must be at least 33 bytes long.
\return The number of bytes absorbed.
Unpack a pair of GSM 06.10 frames from the format used for wave files (wave type 49).
\param s A pointer to a buffer into which the frames will be packed.
\param c The buffer containing the data to be unpacked. This must be at least 65 bytes long.
\return The number of bytes absorbed.
\brief Get the current receive statistics.
\param s A pointer to an HDLC receiver context.
\param t A pointer to the buffer for the statistics.
\return 0 for OK, else -1.
Initialise an HDLC receiver context.
\brief Initialise an HDLC receiver context.
\param s A pointer to an HDLC receiver context.
\param crc32 True to use ITU CRC32. False to use ITU CRC16.
\param report_bad_frames True to request the reporting of bad frames.
\param framing_ok_threshold The number of back-to-back flags needed to
start the framing OK condition. This may be used where a series of
flag octets is used as a preamble, such as in the T.30 protocol.
\param handler The function to be called when a good HDLC frame is received.
\param user_data An opaque parameter for the callback routine.
\return A pointer to the HDLC receiver context.
\brief Put a series of bytes of data to an HDLC receiver.
\param s A pointer to an HDLC receiver context.
\param buf The buffer of data.
\param len The length of the data in the buffer.
Re-initialise an HDLC receiver context. This does not reset the usage statistics.
\brief Re-initialise an HDLC receiver context.
\param s A pointer to an HDLC receiver context.
\return 0 for success.
Change the put_bit function associated with an HDLC receiver context.
\brief Change the put_bit function associated with an HDLC receiver context.
\param s A pointer to an HDLC receiver context.
\param handler The function to be called when a good HDLC frame is received.
\param user_data An opaque parameter for the callback routine.
\brief Set the maximum frame length for an HDLC receiver context.
\param s A pointer to an HDLC receiver context.
\param max_len The maximum permitted length of a frame.
Change the status report function associated with an HDLC receiver context.
\brief Change the status report function associated with an HDLC receiver context.
\param s A pointer to an HDLC receiver context.
\param handler The callback routine used to report status changes.
\param user_data An opaque parameter for the callback routine.
\brief Corrupt the frame currently being transmitted, by giving it the wrong CRC.
\param s A pointer to an HDLC transmitter context.
\return 0 if the frame was corrupted, else -1.
\brief Transmit a specified quantity of flag octets, typically as a preamble.
\param s A pointer to an HDLC transmitter context.
\param len The length of the required period of flags, in flag octets. If len is zero this
requests that HDLC transmission be terminated when the buffers have fully
drained.
\return 0 if the flags were accepted for transmission, else -1.
\brief Transmit a frame.
\param s A pointer to an HDLC transmitter context.
\param frame A pointer to the frame to be transmitted.
\param len The length of the frame to be transmitted.
\return 0 if the frame was accepted for transmission, else -1.
\brief Get the next sequence of bytes for transmission.
\param s A pointer to an HDLC transmitter context.
\param buf The buffer for the data.
\param max_len The number of bytes to get.
\return The number of bytes actually got.
Initialise an HDLC transmitter context.
\brief Initialise an HDLC transmitter context.
\param s A pointer to an HDLC transmitter context.
\param crc32 True to use ITU CRC32. False to use ITU CRC16.
\param inter_frame_flags The minimum flag octets to insert between frames (usually one).
\param progressive True if frame creation works in progressive mode.
\param handler The callback function called when the HDLC transmitter underflows.
\param user_data An opaque parameter for the callback routine.
\return A pointer to the HDLC transmitter context.
Re-initialise an HDLC transmitter context.
\brief Re-initialise an HDLC transmitter context.
\param s A pointer to an HDLC transmitter context.
\return 0 for success.
\brief Set the maximum frame length for an HDLC transmitter context.
\param s A pointer to an HDLC transmitter context.
\param max_len The maximum length.
Decode a buffer of IMA ADPCM data to linear PCM.
\param s The IMA ADPCM context.
\param amp The audio sample buffer.
\param ima_data The IMA ADPCM data
\param ima_bytes The number of bytes of IMA ADPCM data
\return The number of samples returned.
Encode a buffer of linear PCM data to IMA ADPCM.
\param s The IMA ADPCM context.
\param ima_data The IMA ADPCM data produced.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of bytes of IMA ADPCM data produced.
Initialise an IMA ADPCM encode or decode context.
\param s The IMA ADPCM context.
\param variant IMA_ADPCM_IMA4, IMA_ADPCM_DVI4, or IMA_ADPCM_VDVI.
\param chunk_size The size of a chunk, in samples. A chunk size of
zero sample samples means treat each encode or decode operation
as a chunk.
\return A pointer to the IMA ADPCM context, or NULL for error.
\brief Get the length of the image being produced by an image translation context.
\param s The image translation context.
\return The length of the output image, in pixel.
\brief Get the width of the image being produced by an image translation context.
\param s The image translation context.
\return The width of the output image, in pixel.
\brief Initialise an image translation context for rescaling and squashing a gray scale
or colour image to a bi-level FAX type image.
\param s The image translation context.
\param output_format The type of output image
\param output_width The width of the output image, in pixels. If this is set <= 0 the image
will not be resized.
\param output_length The length of the output image, in pixels. If this is set to <= 0 the
output length will be derived automatically from the width, to maintain the geometry
of the original image.
\param input_format The type of source image
\param input_width The width of the source image, in pixels.
\param input_length The length of the source image, in pixels.
\param row_read_handler A callback routine used to pull rows of pixels from the source image
into the translation process.
\param row_read_user_data An opaque pointer passed to read_row_handler
\return A pointer to the context, or NULL if there was a problem.
\brief Release the resources associated with an image translation context.
\param s The image translation context.
\return 0 for success, otherwise -1.
\brief Set the row read callback routine for an image translation context.
\param s The image translation context.
\param row_read_handler A callback routine used to pull rows of pixels from the source image
into the translation process.
\param row_read_user_data An opaque pointer passed to read_row_handler
\return 0 for success, else -1.
Decode a buffer of LPC10e data to linear PCM.
\param s The LPC10e context.
\param amp The audio sample buffer.
\param code The LPC10e data.
\param len The number of bytes of LPC10e data to be decoded. This must be a multiple of 7,
as each frame is packed into 7 bytes.
\return The number of samples returned.
Initialise an LPC10e decode context.
\param s The LPC10e context
\param error_correction ???
\return A pointer to the LPC10e context, or NULL for error.
Encode a buffer of linear PCM data to LPC10e.
\param s The LPC10e context.
\param ima_data The LPC10e data produced.
\param amp The audio sample buffer.
\param len The number of samples in the buffer. This must be a multiple of 180, as
this is the number of samples on a frame.
\return The number of bytes of LPC10e data produced.
Initialise an LPC10e encode context.
\param s The LPC10e context
\param error_correction ???
\return A pointer to the LPC10e context, or NULL for error.
\brief Process a block of samples through an instance of the modem connect
tones detector.
\param s The context.
\param amp An array of signal samples.
\param len The number of samples in the array.
\return The number of unprocessed samples.
Fake processing of a missing block of received modem connect tone samples
(e.g due to packet loss).
\brief Fake processing of a missing block of received modem connect tone samples.
\param s The context.
\param len The number of samples to fake.
\return The number of samples unprocessed.
\brief Initialise an instance of the modem connect tones detector.
\param s The context.
\param tone_type The type of connect tone being tested for.
\param tone_callback An optional callback routine, used to report tones
\param user_data An opaque pointer passed to the callback routine,
\return A pointer to the context.
\brief Generate a block of modem connect tones samples.
\param s The context.
\param amp An array of signal samples.
\param len The number of samples to generate.
\return The number of samples generated.
Create a modem echo canceller context.
\param len The length of the canceller, in samples.
eturn The new canceller context, or NULL if the canceller could not be created.
Process a sample through a modem echo canceller.
\param ec The echo canceller context.
\param tx The transmitted audio sample.
\param rx The received audio sample.
eturn The clean (echo cancelled) received sample.
Initialise an audio noise generator.
\brief Initialise an audio noise generator.
\param s The noise generator context.
\param seed A seed for the underlying random number generator.
\param level The noise power level in dBmO.
\param class_of_noise The class of noise (e.g. AWGN).
\param quality A parameter which permits speed and accuracy of the noise
generation to be adjusted.
\return A pointer to the noise generator context.
Decode a buffer of Oki ADPCM data to linear PCM.
\param s The Oki ADPCM context.
\param amp The audio sample buffer.
\param oki_data
\param oki_bytes
\return The number of samples returned.
Encode a buffer of linear PCM data to Oki ADPCM.
\param s The Oki ADPCM context.
\param oki_data The Oki ADPCM data produced
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of bytes of Oki ADPCM data produced.
Initialise an Oki ADPCM encode or decode context.
\param s The Oki ADPCM context.
\param bit_rate The required bit rate for the ADPCM data.
The valid rates are 24000 and 32000.
\return A pointer to the Oki ADPCM context, or NULL for error.
Evaluate a periodogram.
\param coeffs A set of coefficients generated by periodogram_generate_coeffs().
\param amp The complex amplitude of the signal.
\param len The length of the periodogram, in samples. This must be an even number.
\return The periodogram result.
Evaluate a periodogram, based on data prepared by periodogram_prepare(). This is more efficient
than using periodogram() when several periodograms are to be applied to the same signal.
\param coeffs A set of coefficients generated by periodogram_generate_coeffs().
\param sum A vector of sums produced by periodogram_prepare().
\param diff A vector of differences produced by periodogram_prepare().
\param len The length of the periodogram, in samples. This must be an even number.
\return The periodogram result.
Apply a phase offset, to find the frequency error between periodogram evaluations.
specified interval.
\param phase_offset A point to the expected phase offset.
\param scale The scaling factor to be used.
\param last_result A pointer to the previous periodogram result.
\param result A pointer to the current periodogram result.
\return The frequency error, in Hz.
Generate a Hamming weighted coefficient set, to be used for a periodogram analysis.
\param coeffs The generated coefficients.
\param freq The frequency to be matched by the periodogram, in Hz.
\param sample_rate The sample rate of the signal, in samples per second.
\param window_len The length of the periodogram window. This must be an even number.
\return The number of generated coefficients.
Generate the phase offset to be expected between successive periodograms evaluated at the
specified interval.
\param offset A point to the generated phase offset.
\param freq The frequency being matched by the periodogram, in Hz.
\param sample_rate The sample rate of the signal, in samples per second.
\param interval The interval between periodograms, in samples.
\return The scaling factor.
Prepare data for evaluating a set of periodograms.
\param sum A vector of sums of pairs of signal samples. This will be half the length of len.
\param diff A vector of differences between pairs of signal samples. This will be half the length of len.
\param amp The complex amplitude of the signal.
\param len The length of the periodogram, in samples. This must be an even number.
\return The length of the vectors sum and diff.
Get the next frame.
\param s The play-out context.
\param frame The frame.
\param sender_stamp The sender’s timestamp.
\return One of
PLAYOUT_OK: Suitable frame found.
PLAYOUT_DROP: A frame which should be dropped was found (e.g. it arrived too late).
The caller should request the same time again when this occurs.
PLAYOUT_NOFRAME: There’s no frame scheduled for this time.
PLAYOUT_FILLIN: Synthetic signal must be generated, as no real data is available for
this time (either we need to grow, or there was a lost frame).
PLAYOUT_EMPTY: The buffer is empty.
Unconditionally get the first buffered frame. This may be used to clear out the queue, and free
all its contents, before the context is freed.
\param s The play-out context.
\return The frame, or NULL is the queue is empty.
Create a new instance of play-out buffering.
\param min_length Minimum length of the buffer, in samples.
\param max_length Maximum length of the buffer, in samples. If this equals min_length, static
length buffering is used.
\return The new context
Find the time at which the next queued frame is due to play.
Note: This value may change backwards as freshly received out of order frames are
added to the buffer.
\param s The play-out context.
\return The next timestamp.
Queue a frame
\param s The play-out context.
\param data The frame data.
\param sender_len Length of frame (for voice) in timestamp units.
\param sender_stamp Sending end’s time stamp.
\param receiver_stamp Local time at which packet was received, in timestamp units.
\return One of
PLAYOUT_OK: Frame queued OK.
PLAYOUT_ERROR: Some problem occured - e.g. out of memory.
Reset an instance of play-out buffering.
NOTE: The buffer should be empty before you call this function, otherwise
you will leak queued frames, and some internal structures
\param s The play-out context.
\param min_length Minimum length of the buffer, in samples.
\param max_length Maximum length of the buffer, in samples. If this equals min_length, static
length buffering is used.
Fill-in a block of missing audio samples.
\brief Fill-in a block of missing audio samples.
\param s The packet loss concealer context.
\param amp The audio sample buffer.
\param len The number of samples to be synthesised.
\return The number of samples synthesized.
Initialise a packet loss concealer context.
\brief Initialise a PLC context.
\param s The packet loss concealer context.
\return A pointer to the the packet loss concealer context.
Process a block of received audio samples for PLC.
\brief Process a block of received audio samples for PLC.
\param s The packet loss concealer context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of samples in the buffer.
Get the current power meter reading.
\brief Get the current power meter reading.
\param s The power meter context.
\return The current power meter reading.
Get the current power meter reading, in dBm0.
\brief Get the current power meter reading, in dBm0.
\param s The power meter context.
\return The current power meter reading, in dBm0.
Get the current power meter reading, in dBOv.
\brief Get the current power meter reading, in dBOv.
\param s The power meter context.
\return The current power meter reading, in dBOv.
Change the damping factor of a power meter context.
\brief Change the damping factor of a power meter context.
\param s The power meter context.
\param shift The new shift to be used by the IIR filter.
\return The power meter context.
Initialise a power meter context.
\brief Initialise a power meter context.
\param s The power meter context.
\param shift The shift to be used by the IIR filter.
\return The power meter context.
Get the power meter reading which represents a specified power level in dBm0.
\brief Get the current power meter reading, in dBm0.
\param level A power level, in dB0m.
\return The equivalent power meter reading.
Get the power meter reading which represents a specified power level in dBOv.
\brief Get the current power meter reading, in dBOv.
\param level A power level, in dBOv.
\return The equivalent power meter reading.
Update a power meter with a block of samples.
\brief Update a power meter.
\param s The power meter context.
\param amp The amplitude of the new audio sample.
\param len The number of samples
\return The current power meter reading.
Update a power meter with a signal sample.
\brief Update a power meter.
\param s The power meter context.
\param amp The amplitude of the new audio sample.
\return The current power meter reading.
Get the current surge detector short term meter reading, in dBm0.
\brief Get the current surge detector meter reading, in dBm0.
\param s The power surge detector context.
\return The current power surge detector power reading, in dBm0.
Get the current surge detector short term meter reading, in dBOv.
\brief Get the current surge detector meter reading, in dBOv.
\param s The power surge detector context.
\return The current power surge detector power reading, in dBOv.
Check the available free space in a queue’s buffer.
\brief Check available free space.
\param s The queue context.
\return The number of bytes of free space.
Initialise a queue.
\brief Initialise a queue.
\param s The queue context. If is imperative that the context this
points to is immediately followed by a buffer of the required
size + 1 octet.
\param len The length of the queue’s buffer.
\param flags Flags controlling the operation of the queue.
Valid flags are QUEUE_READ_ATOMIC and QUEUE_WRITE_ATOMIC.
\return A pointer to the context if OK, else NULL.
Read bytes from a queue.
\brief Read bytes from a queue.
\param s The queue context.
\param buf The buffer into which the bytes will be read.
\param len The length of the buffer.
\return the number of bytes returned.
Read a message from a queue. If the message is longer than the buffer
provided, only the first len bytes of the message will be returned. The
remainder of the message will be discarded.
\brief Read a message from a queue.
\param s The queue context.
\param buf The buffer into which the message will be read.
\param len The length of the buffer.
\return The number of bytes returned. If there are
no messages in the queue, -1 is returned.
Test the length of the message at the head of a queue.
\brief Test message length.
\param s The queue context.
\return The length of the next message, in byte. If there are
no messages in the queue, -1 is returned.
Copy bytes from a queue. This is similar to queue_read, but
the data remains in the queue.
\brief Copy bytes from a queue.
\param s The queue context.
\param buf The buffer into which the bytes will be read.
\param len The length of the buffer.
\return the number of bytes returned.
Write bytes to a queue.
\brief Write bytes to a queue.
\param s The queue context.
\param buf The buffer containing the bytes to be written.
\param len The length of the buffer.
\return the number of bytes actually written.
Write a byte to a queue.
\brief Write a byte to a queue.
\param s The queue context.
\param byte The byte to be written.
\return the number of bytes actually written.
Write a message to a queue.
\brief Write a message to a queue.
\param s The queue context.
\param buf The buffer from which the message will be written.
\param len The length of the message.
\return The number of bytes actually written.
Process a block of received audio samples.
\brief Process a block of received audio samples.
\param s The signalling tone context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of samples unprocessed.
Initialise a signalling tone receiver context.
\brief Initialise a signalling tone context.
\param s The signalling tone context.
\param tone_type The type of signalling tone.
\param sig_update Callback function to handle signalling updates.
\param user_data An opaque pointer.
\return A pointer to the signalling tone context, or NULL if there was a problem.
Set the receive mode.
\brief Set the receive mode.
\param s The signalling tone context.
\param mode The new mode for the receiver.
\param duration The duration for this mode, before an update is requested.
A duration of zero means forever.
Generate a block of signalling tone audio samples.
\brief Generate a block of signalling tone audio samples.
\param s The signalling tone context.
\param amp The audio sample buffer.
\param len The number of samples to be generated.
\return The number of samples actually generated.
Initialise a signalling tone transmitter context.
\brief Initialise a signalling tone context.
\param s The signalling tone context.
\param tone_type The type of signalling tone.
\param sig_update Callback function to handle signalling updates.
\param user_data An opaque pointer.
\return A pointer to the signalling tone context, or NULL if there was a problem.
Release a signalling tone transmitter context.
\brief Release a signalling tone transmitter context.
\param s The signalling tone context.
\return 0 for OK
Set the tone mode.
\brief Set the tone mode.
\param s The signalling tone context.
\param mode The new mode for the transmitted tones.
\param duration The duration for this mode, before an update is requested.
A duration of zero means forever.
Generate a block of silent audio samples.
\brief Generate a block of silent audio samples.
\param s The silence generator context.
\param amp The audio sample buffer.
\param max_len The number of samples to be generated.
\return The number of samples actually generated. This will be zero when
there is nothing to send.
Alter the period of a silence generator context by a specified amount.
\brief Alter the period of a silence generator context by a specified amount.
\param s The silence generator context.
\param silent_samples The number of samples to change the setting by. A positive number
increases the duration. A negative number reduces it. The duration
is prevented from going negative.
Set a silence generator context to output continuous silence.
\brief Set a silence generator context to output continuous silence.
\param s The silence generator context.
Find the total silence generated to date by a silence generator context.
\brief Find the total silence generated to date.
\param s The silence generator context.
\return The number of samples generated.
Initialise a timed silence generator context.
\brief Initialise a timed silence generator context.
\param s The silence generator context.
\param silent_samples The initial number of samples to set the silence to.
\return A pointer to the silence generator context.
Find how long a silence generator context has to run.
\brief Find how long a silence generator context has to run.
\param s The silence generator context.
\return The number of samples remaining.
Set a silence generator context to output a specified period of silence.
\brief Set a silence generator context to output a specified period of silence.
\param s The silence generator context.
\param silent_samples The number of samples to be generated.
Change the status reporting function associated with a silence generator context.
\brief Change the status reporting function associated with a silence generator context.
\param s The silence generator context.
\param handler The callback routine used to report status changes.
\param user_data An opaque pointer.
Generate a log entry.
\brief Generate a log entry.
\param s The logging context.
\param level The severity level of the entry.
\param format ???
\return 0 if no output generated, else 1.
Generate a log entry displaying the contents of a buffer.
\brief Generate a log entry displaying the contents of a buffer
\param s The logging context.
\param level The severity level of the entry.
\param tag A label for the log entry.
\param buf The buffer to be dumped to the log.
\param len The length of buf.
\return 0 if no output generated, else 1.
Test if logging of a specified severity level is enabled.
\brief Test if logging of a specified severity level is enabled.
\param s The logging context.
\param level The severity level to be tested.
\return True if logging is enable.
Test whether the far end of the specified channel of the SPRT context is currently busy.
\brief Test if far end of SPRT context is busy.
\param s The SPRT context.
\param channel The SPRT channel number.
\return true for busy
Get the logging context associated with an SPRT context.
\brief Get the logging context associated with an SPRT context.
\param s The SPRT context.
\return A pointer to the logging context
\brief Initialise an SPRT context.
\param s The SPRT context.
\param subsession_id The subsession ID for transmitted SPRT headers
\param rx_payload_type The payload type expected in received SPRT headers
\param tx_payload_type The payload type sent in transmitted SPRT headers
\param parms The parameter set for sizing the SPRT instance. NULL means use the defaults.
\param tx_packet_handler The callback function, used to send assembled packets.
\param tx_user_data An opaque pointer supplied to tx_packet_handler.
\param rx_delivery_handler The callback function, used to report arriving packets.
\param rx_user_data An opaque pointer supplied to rx_delivery_handler.
\param timer_handler The callback function, used to control the timers used by SPRT.
\param timer_user_data An opaque pointer supplied to timer_handler.
\param status_handler The callback function, used to report status events.
\param status_user_data An opaque pointer supplied to status_handler.
\return A pointer to the SPRT context, or NULL if there was a problem.
\brief Process a packet arriving from the far end. If the packet validates as an SPRT
packet 0 is returned. If the packet does not follow the structure of an SPRT
packet, or its packet type field does not contain the expected value, -1 is
returned. In a mixed packet environment, where things like RTP, T.38 and SPRT
packets are mixed in the same stream, -1 should indicate than one of the other
packet sinks should be tried.
\param s The SPRT context.
\param pkt The SPRT packet buffer.
\param len The length of the packet.
\return 0 for accepted as a valid SPRT packet. -1 for rejected as an SPRT packet.
Set whether the local end of the specified channel of the SPRT context is currently busy.
\brief Test if local end of SPRT context is busy.
\param s The SPRT context.
\param channel The SPRT channel number.
\param busy true for busy.
\return true for previously busy
\brief Find the name of an SPRT channel.
\param channel The number of the SPRT channel (0 to 3).
\return A pointer to a short string name for the channel, or NULL for an invalid channel.
\brief Send a message to a SPRT channel.
\param s The SPRT context.
\param channel The SPRT channel.
\param buf The message.
\param len The length of the message.
\return 0 for OK.
Apply supervisory tone detection processing to a block of audio samples.
\brief Apply supervisory tone detection processing to a block of audio samples.
\param super The supervisory tone context.
\param amp The audio sample buffer.
\param samples The number of samples in the buffer.
\return The number of samples processed.
Add a new tone pattern element to a tone pattern in a supervisory tone detector.
\param desc The supervisory tone set desciptor.
\param tone The tone ID within the descriptor.
\param f1 Frequency 1 (-1 for a silent period).
\param f2 Frequency 2 (-1 for a silent period, or only one frequency).
\param min The minimum duration, in ms.
\param max The maximum duration, in ms.
\return The new number of elements in the tone description.
Allow for a missing block of samples to a supervisory tone detector.
\brief Allow for a missing block of samples to a supervisory tone detector.
\param super The supervisory tone context.
\param samples The number of samples to allow for.
\return The number of samples processed.
Initialise a supervisory tone detector.
\param s The supervisory tone detector context.
\param desc The tone descriptor.
\param callback The callback routine called to report the valid detection or termination of
one of the monitored tones.
\param user_data An opaque pointer passed when calling the callback routine.
\return The supervisory tone detector context.
Create a new supervisory tone detector descriptor.
\param desc The supervisory tone set desciptor. If NULL, the routine will allocate space for a
descriptor.
\return The supervisory tone set descriptor.
Define a callback routine to be called each time a tone pattern element is complete. This is
mostly used when analysing a tone.
\param s The supervisory tone context.
\param callback The callback routine.
Define a callback routine to be called to report the valid detection or termination of
one of the monitored tones.
\param s The supervisory tone context.
\param callback The callback routine called to report the valid detection or termination of
one of the monitored tones.
\param user_data An opaque pointer passed when calling the callback routine.
Generate a block of audio samples for a supervisory tone pattern.
\brief Generate a block of audio samples for a supervisory tone pattern.
\param s The supervisory tone context.
\param amp The audio sample buffer.
\param max_samples The maximum number of samples to be generated.
\return The number of samples generated.
Initialise a supervisory tone generator.
\brief Initialise a supervisory tone generator.
\param s The supervisory tone generator context.
\param tree The supervisory tone tree to be generated.
\return The supervisory tone generator context.
Get the short text name of a compression format.
\brief Get the short text name of an encoding format.
\param compression The compression type.
\return A pointer to the string.
Get the short text name of an image resolution.
\brief Get the short text name of an image resolution.
\param resolution_code The image resolution code.
\return A pointer to the string.
Get the short text name of an image format.
\brief Get the short text name of an image format.
\param type The image format.
\return A pointer to the string.
\brief End reception of a document. Tidy up, close the file and
free the context. This should be used to end T.4 reception
started with t4_rx_init.
\param s The T.4 receive context.
\return 0 for success, otherwise -1.
Get the logging context associated with a T.4 receive context.
\brief Get the logging context associated with a T.4 receive context.
\param s The T.4 receive context.
\return A pointer to the logging context
Get the current image transfer statistics.
\brief Get the current transfer statistics.
\param s The T.4 context.
\param t A pointer to a statistics structure.
\brief Prepare for reception of a document.
\param s The T.4 context.
\param file The name of the file to be received.
\param supported_output_compressions The compression schemes supported for output to a TIFF file.
\return A pointer to the context, or NULL if there was a problem.
\brief Put a byte of the current document page.
\param s The T.4 context.
\param buf The buffer containing the chunk.
\param len The length of the chunk.
\return Decode status.
\brief End reception of a document. Tidy up and close the file.
This should be used to end T.4 reception started with t4_rx_init.
\param s The T.4 receive context.
\return 0 for success, otherwise -1.
\brief Set the DCS information of the fax, for inclusion in the file.
\param s The T.4 context.
\param dcs The DCS information, formatted as an ASCII string.
\brief Set the row write handler for a T.4 receive context.
\param s The T.4 receive context.
\param handler A pointer to the handler routine.
\param user_data An opaque pointer passed to the handler routine.
\return 0 for success, otherwise -1.
\brief Set the column-to-column (x) resolution to expect for a received image.
\param s The T.4 context.
\param resolution The resolution, in pixels per metre.
\brief Set the row-to-row (y) resolution to expect for a received image.
\param s The T.4 context.
\param resolution The resolution, in pixels per metre.
Get the logging context associated with a T.4 or T.6 decode context.
\brief Get the logging context associated with a T.4 or T.6 decode context.
\param s The T.4/T.6 context.
\return A pointer to the logging context
\brief Prepare to decode an image in T.4 or T.6 format.
\param s The T.4/T.6 context.
\param encoding The encoding mode.
\param image width The image width, in pixels.
\param handler A callback routine to handle decoded image rows.
\param user_data An opaque pointer passed to handler.
\return A pointer to the context, or NULL if there was a problem.
\brief Put a byte of the current document page.
\param s The T.4/T.6 context.
\param buf The buffer containing the chunk.
\param len The length of the chunk.
\return T4_DECODE_MORE_DATA when the image is still in progress. T4_DECODE_OK when the image is complete.
\brief Set the row write handler for a T.4/T.6 decode context.
\param s The T.4/T.6 context.
\param handler A pointer to the handler routine.
\param user_data An opaque pointer passed to the handler routine.
\return 0 for success, otherwise -1.
\brief Get the next chunk of the current document page. The document will
be padded for the current minimum scan line time.
\param s The T.4/T.6 context.
\param buf The buffer into which the chunk is to written.
\param max_len The maximum length of the chunk.
\return The actual length of the chunk. If this is less than max_len it
indicates that the end of the document has been reached.
\brief Get the next bit of the current image. The image will
be padded for the current minimum scan line time.
\param s The T.4/T.6 context.
\return The next bit (i.e. 0 or 1). SIG_STATUS_END_OF_DATA for no more data.
Get the logging context associated with a T.4 or T.6 encode context.
\brief Get the logging context associated with a T.4 or T.6 encode context.
\param s The T.4/T.6 context.
\return A pointer to the logging context
\brief Return the next bit of the current document page, without actually
moving forward in the buffer. The document will be padded for the
current minimum scan line time.
\param s The T.4/T.6 context.
\return 0 for more data to come. SIG_STATUS_END_OF_DATA for no more data.
\brief Prepare to encode an image in T.4 or T.6 format.
\param s The T.4/T.6 context.
\param encoding The encoding mode.
\param image_width The image width, in pixels.
\param image_length The image length, in pixels. This can be set to -1, if the length is not known.
\param handler A callback routine to handle decoded image rows.
\param user_data An opaque pointer passed to handler.
\return A pointer to the context, or NULL if there was a problem.
\brief Restart a T.4 or T.6 encode context.
\param s The T.4/T.6 context.
\param image_width The image width, in pixels.
\param image_length The image length, in pixels. This can be set to -1, if the length is not known.
\return 0 for success, otherwise -1.
\brief Set the length of the image.
\param s The T.4/T.6 context.
\param image_length The image length, in pixels.
\return 0 for success, otherwise -1.
\brief Set the maximum number of 2D encoded rows between 1D encoded rows. This
is only valid for T.4 2D encoding.
\param s The T.4/T.6 context.
\param max The “K” parameter defined in the T.4 specification. This means the value is one
greater than the maximum number of 2D rows between each 1D row.
\brief Set the minimum number of encoded bits per row. This allows the
makes the encoding process to be set to comply with the minimum row
time specified by a remote receiving machine.
\param s The T.4/T.6 context.
\param bits The minimum number of bits per row.
\brief Set the row read handler for a T.4/T.6 encode context.
\param s The T.4/T.6 context.
\param handler A pointer to the handler routine.
\param user_data An opaque pointer passed to the handler routine.
\return 0 for success, otherwise -1.
\brief End the transmission of a document. Tidy up, close the file and
free the context. This should be used to end T.4 transmission
started with t4_tx_init.
\param s The T.4 context.
\return 0 for success, otherwise -1.
\brief Get the next chunk of the current document page. The document will
be padded for the current minimum scan line time.
\param s The T.4 context.
\param buf The buffer into which the chunk is to written.
\param max_len The maximum length of the chunk.
\return The actual length of the chunk. If this is less than max_len it
indicates that the end of the document has been reached.
\brief Get the next bit of the current document page. The document will
be padded for the current minimum scan line time.
\param s The T.4 context.
\return The next bit (i.e. 0 or 1). SIG_STATUS_END_OF_DATA for no more data.
Get the logging context associated with a T.4 transmit context.
\brief Get the logging context associated with a T.4 transmit context.
\param s The T.4 transmit context.
\return A pointer to the logging context
Get the current image transfer statistics.
\brief Get the current transfer statistics.
\param s The T.4 context.
\param t A pointer to a statistics structure.
\brief Return the next bit of the current document page, without actually
moving forward in the buffer. The document will be padded for the
current minimum scan line time.
\param s The T.4 context.
\return 0 for more data to come. SIG_STATUS_END_OF_DATA for no more data.
\brief Prepare for transmission of a document.
\param s The T.4 context.
\param file The name of the file to be sent.
\param start_page The first page to send. -1 for no restriction.
\param stop_page The last page to send. -1 for no restriction.
\return A pointer to the context, or NULL if there was a problem.
\brief Check for the existance of the next page, and whether its format is like the
current one. This information can be needed before it is determined that the current
page is finished with.
\param s The T.4 context.
\return 0 for next page found with the same format as the current page.
1 for next page found with different format from the current page.
-1 for no page found, or file failure.
\brief End the transmission of a document. Tidy up and close the file.
This should be used to end T.4 transmission started with t4_tx_init.
\param s The T.4 context.
\return 0 for success, otherwise -1.
Set the info field, included in the header line included in each page of an encoded
FAX. This is a string of up to 50 characters. Other information (date, local ident, etc.)
are automatically included in the header. If the header info is set to NULL or a zero
length string, no header lines will be added to the encoded FAX.
\brief Set the header info.
\param s The T.4 context.
\param info A string, of up to 50 bytes, which will form the info field.
Set page header extends or overlays the image mode.
\brief Set page header overlay mode.
\param s The T.4 context.
\param header_overlays_image True for overlay, or false to extend the page.
Set the time zone for the time stamp in page header lines. If this function is not used
the current time zone of the program’s environment is used.
\brief Set the header timezone.
\param s The T.4 context.
\param tz A time zone descriptor.
\brief Set the maximum number of 2D encoded rows between 1D encoded rows. This
is only valid for T.4 2D encoding.
\param s The T.4 context.
\param max The maximum number of 2D rows.
\brief Set the minimum number of encoded bits per row. This allows the
makes the encoding process to be set to comply with the minimum row
time specified by a remote receiving machine.
\param s The T.4 context.
\param bits The minimum number of bits per row.
\brief Set the row read handler for a T.4 transmit context.
\param s The T.4 transmit context.
\param handler A pointer to the handler routine.
\param user_data An opaque pointer passed to the handler routine.
\return 0 for success, otherwise -1.
\brief Auto-select the format in which to send the image.
\param s The T.4 context.
\param supported_compressions The set of compressions supported for this transmission
\param supported_image_sizes The set of image sizes supported for this transmission
\param supported_bilevel_resolutions The set of bi-level resolutions supported for this transmission
\param supported_colour_resolutions The set of gray scale and colour resolutions supported for this transmission
\return A t4_image_format_status_t result code
Check if a T.30 call is still active. This may be used to regularly poll
if the job has finished.
\brief Check if a T.30 call is still active.
\param s The T.30 context.
\return True for call still active, or false for call completed.
Convert a phase E completion code to a short text description.
\brief Convert a phase E completion code to a short text description.
\param result The result code.
\return A pointer to the description.
Return a text name for a T.30 frame type.
\brief Return a text name for a T.30 frame type.
\param x The frametype octet.
\return A pointer to the text name for the frame type. If the frame type is
not value, the string “???” is returned.
Inform the T.30 engine of a status change in the front end (end of tx, rx signal change, etc.).
\brief Inform the T.30 engine of a status change in the front end (end of tx, rx signal change, etc.).
\param user_data The T.30 context.
\param status The type of status change which occured.
Get a pointer to the logging context associated with a T.30 context.
\brief Get a pointer to the logging context associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the logging context, or NULL.
Get the received CIA associated with a T.30 context.
\brief Get the received CIA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\return 0 for OK, else -1.
Get the country of origin of the remote FAX machine associated with a T.30 context.
\brief Get the country of origin of the remote FAX machine associated with a T.30 context.
\param s The T.30 context.
\return a pointer to the country name, or NULL if the country is not known.
Get the received CSA associated with a T.30 context.
\brief Get the received CSA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\return 0 for OK, else -1.
Get the transmitted identifier associated with a T.30 context.
\brief Set the transmitted identifier associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the identifier.
Get the received IRA associated with a T.30 context.
\brief Get the received IRA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\return The length of the address.
Get the received ISP associated with a T.30 context.
\brief Get the received ISP associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\return 0 for OK, else -1.
Get the name of the model of the remote FAX machine associated with a T.30 context.
\brief Get the name of the model of the remote FAX machine associated with a T.30 context.
\param s The T.30 context.
\return a pointer to the model name, or NULL if the model is not known.
Get an NSC frame to be associated with a T.30 context.
\brief Set an NSC frame to be associated with a T.30 context.
\param s The T.30 context.
\param nsc A pointer to the frame.
\return the length of the NSC message.
Get an NSF frame to be associated with a T.30 context.
\brief Set an NSF frame to be associated with a T.30 context.
\param s The T.30 context.
\param nsf A pointer to the frame.
\return the length of the NSF message.
Get an NSS frame to be associated with a T.30 context.
\brief Set an NSS frame to be associated with a T.30 context.
\param s The T.30 context.
\param nss A pointer to the frame.
\return the length of the NSS message.
Get the received password (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received password associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the password.
Get the received polled sub-address (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received polled sub-address associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the polled sub-address.
Get the received selective polling address (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received selective polling address associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the selective polling address.
Get the received sender ident (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received sender ident associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the sender ident.
Get the received sub-address associated with a T.30 context.
\brief Get the received sub-address associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the sub-address.
Get the received TSA associated with a T.30 context.
\brief Get the received TSA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\return The length of the address.
Get the name of the vendor of the remote FAX machine associated with a T.30 context.
\brief Get the name of the vendor of the remote FAX machine associated with a T.30 context.
\param s The T.30 context.
\return a pointer to the vendor name, or NULL if the vendor is not known.
Get the current transfer statistics for the file being sent or received.
\brief Get the current transfer statistics.
\param s The T.30 context.
\param t A pointer to a buffer for the statistics.
Get the transmitted CIA (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received CIA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\return The length of the address.
Get the transmitted CSA (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received CSA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\return The length of the address.
Get the transmitted identifier associated with a T.30 context.
\brief Set the transmitted identifier associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the identifier.
Get the transmitted IRA (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received IRA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\return The length of the address.
Get the transmitted ISP (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received ISP associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\return 0 for OK, else -1.
Get an NSC frame to be associated with a T.30 context.
\brief Set an NSC frame to be associated with a T.30 context.
\param s The T.30 context.
\param nsc A pointer to the frame.
\return the length of the NSC message.
Get an NSF frame to be associated with a T.30 context.
\brief Set an NSF frame to be associated with a T.30 context.
\param s The T.30 context.
\param nsf A pointer to the frame.
\return the length of the NSF message.
Get an NSS frame to be associated with a T.30 context.
\brief Set an NSS frame to be associated with a T.30 context.
\param s The T.30 context.
\param nss A pointer to the frame.
\return the length of the NSS message.
Get the header information associated with a T.30 context.
\brief Get the header information associated with a T.30 context.
\param s The T.30 context.
\param info A pointer to a buffer for the header information. The buffer
should be at least 51 bytes long.
\return the length of the string.
Get the received password (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received password associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the password.
Get the received polled sub-address (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received polled sub-address associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the polled sub-address.
Get the received selective polling address (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received selective polling address associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the selective polling address.
Get the received sender ident (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received sender ident associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the sender ident.
Get the received sub-address associated with a T.30 context.
\brief Get the received sub-address associated with a T.30 context.
\param s The T.30 context.
\return A pointer to the sub-address.
Get the transmitted TSA (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Get the received TSA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\return The length of the address.
Process a received HDLC frame.
\brief Process a received HDLC frame.
\param user_data The T.30 context.
\param msg The HDLC message.
\param len The length of the message, in octets.
\param ok True if the frame was received without error.
Initialise a T.30 context.
\brief Initialise a T.30 context.
\param s The T.30 context.
\param calling_party True if the context is for a calling party. False if the
context is for an answering party.
\param set_rx_type_handler
\param set_rx_type_user_data
\param set_tx_type_handler
\param set_tx_type_user_data
\param send_hdlc_handler
\param send_hdlc_user_data
\return A pointer to the context, or NULL if there was a problem.
Request a local interrupt of FAX exchange.
\brief Request a local interrupt of FAX exchange.
\param s The T.30 context.
\param state True to enable interrupt request, else false.
Decode a DIS, DTC or DCS frame, and log the contents.
\brief Decode a DIS, DTC or DCS frame, and log the contents.
\param s The spandsp logging context.
\param dis A pointer to the frame to be decoded.
\param len The length of the frame.
Convert a T.30 modem type to a short text description.
\brief Convert a T.30 modem type to a short text description.
\param modem The modem code.
\return A pointer to the description.
Get a chunk of received non-ECM image data.
\brief Get a bit of received non-ECM image data.
\param user_data An opaque pointer, which must point to the T.30 context.
\param buf The buffer to contain the data.
\param max_len The maximum length of the chunk.
\return The actual length of the chunk.
Get a bit of received non-ECM image data.
\brief Get a bit of received non-ECM image data.
\param user_data An opaque pointer, which must point to the T.30 context.
\return The next bit to transmit.
Process a chunk of received non-ECM image data.
\brief Process a chunk of received non-ECM image data
\param user_data An opaque pointer, which must point to the T.30 context.
\param buf The buffer containing the received data.
\param len The length of the data in buf.
Process a bit of received non-ECM image data.
\brief Process a bit of received non-ECM image data
\param user_data An opaque pointer, which must point to the T.30 context.
\param bit The received bit.
Allow remote interrupts of FAX exchange.
\brief Allow remote interrupts of FAX exchange.
\param s The T.30 context.
\param state True to allow interruptd, else false.
Restart a T.30 context.
\brief Restart a T.30 context.
\param s The T.30 context.
\param calling_party True if the context is for a calling party. False if the
context is for an answering party.
\return 0 for OK, else -1.
Set a callback function for T.30 end of document handling.
\brief Set a callback function for T.30 end of document handling.
\param s The T.30 context.
\param handler The callback function.
\param user_data An opaque pointer passed to the callback function.
Specify if error correction mode (ECM) is allowed by a T.30 context.
\brief Select ECM capability.
\param s The T.30 context.
\param enabled True for ECM capable, or false for not ECM capable.
\return 0 if OK, else -1.
Set Internet aware FAX (IAF) mode.
\brief Set Internet aware FAX (IAF) mode.
\param s The T.30 context.
\param iaf Bitmap of values from enum t30_iaf_mode_e.
Set the save bad quality pages handling associated with a T.30 context.
\brief Set the save bad quality pages handling associated with a T.30 context.
\param s The T.30 context.
\param keep_bad_pages True to save bad quality pages.
Specify the maximum number of times a command will be tried by a T.30 context before giving up.
\brief Select maximum command tries.
\param s The T.30 context.
\param tries The mmaximum number of tries. Default is 3
Specify the maximum number of times a response will be tried by a T.30 context before giving up.
\brief Select maximum response tries.
\param s The T.30 context.
\param tries The mmaximum number of tries. Default is 6
Specify the minimum scan line time supported by a T.30 context.
\brief Specify minimum scan line time.
\param s The T.30 context.
\param min_time The minimum permitted scan line time, in milliseconds.
\return 0 if OK, else -1.
Set a callback function for T.30 phase B handling.
\brief Set a callback function for T.30 phase B handling.
\param s The T.30 context.
\param handler The callback function.
\param user_data An opaque pointer passed to the callback function.
Set a callback function for T.30 phase D handling.
\brief Set a callback function for T.30 phase D handling.
\param s The T.30 context.
\param handler The callback function.
\param user_data An opaque pointer passed to the callback function.
Set a callback function for T.30 phase E handling.
\brief Set a callback function for T.30 phase E handling.
\param s The T.30 context.
\param handler The callback function.
\param user_data An opaque pointer passed to the callback function.
Set a callback function for T.30 frame exchange monitoring. This is called from the heart
of the signal processing, so don’t take too long in the handler routine.
\brief Set a callback function for T.30 frame exchange monitoring.
\param s The T.30 context.
\param handler The callback function.
\param user_data An opaque pointer passed to the callback function.
Specify a period of responding with receiver not ready.
\brief Specify a period of responding with receiver not ready.
\param s The T.30 context.
\param count The number of times to report receiver not ready.
\return 0 if OK, else -1.
Specify if page retransmission is allowed by a T.30 context.
\brief Select page retransmission capable.
\param s The T.30 context.
\param enabled True for retransmit capable, or false for not retransmit capable.
Specify the file name of the next TIFF file to be received by a T.30
context.
\brief Set next receive file name.
\param s The T.30 context.
\param file The file name
\param stop_page The maximum page to receive. -1 for no restriction.
Set T.30 status. This may be used to adjust the status from within
the phase B and phase D callbacks.
\brief Set T.30 status.
\param s The T.30 context.
\param status The new status.
Specify which bi-level resolutions are supported by a T.30 context.
\brief Specify supported bi-level resolutions.
\param s The T.30 context.
\param supported_resolutions Bit field list of the supported resolutions.
\return 0 if OK, else -1.
Specify which colour resolutions are supported by a T.30 context.
\brief Specify supported colour resolutions.
\param s The T.30 context.
\param supported_resolutions Bit field list of the supported resolutions.
\return 0 if OK, else -1.
Specify which compression types are supported by a T.30 context.
\brief Specify supported compression types.
\param s The T.30 context.
\param supported_compressions Bit field list of the supported compression types.
\return 0 if OK, else -1.
Specify which images sizes are supported by a T.30 context.
\brief Specify supported image sizes.
\param s The T.30 context.
\param supported_image_sizes Bit field list of the supported widths and lengths.
\return 0 if OK, else -1.
Specify which modem types are supported by a T.30 context.
\brief Specify supported modems.
\param s The T.30 context.
\param supported_modems Bit field list of the supported modems.
\return 0 if OK, else -1.
Specify the output encoding for TIFF files created during FAX reception.
\brief Specify the output encoding for TIFF files created during FAX reception.
\param s The T.30 context.
\param supported_compressions Bit field list of the supported compression types, for
output of received page images.
\return 0 if OK, else -1.
Specify which special T.30 features are supported by a T.30 context.
\brief Specify supported T.30 features.
\param s The T.30 context.
\param supported_t30_features Bit field list of the supported features.
\return 0 if OK, else -1.
Set the transmitted CIA (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Set the transmitted CIA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\param len The length of the address.
\return 0 for OK, else -1.
Set the transmitted CSA (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Set the transmitted CSA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\param len The length of the address.
\return 0 for OK, else -1.
Specify the file name of the next TIFF file to be transmitted by a T.30
context.
\brief Set next transmit file name.
\param s The T.30 context.
\param file The file name
\param start_page The first page to send. -1 for no restriction.
\param stop_page The last page to send. -1 for no restriction.
Set the transmitted identifier associated with a T.30 context.
\brief Set the transmitted identifier associated with a T.30 context.
\param s The T.30 context.
\param id A pointer to the identifier.
\return 0 for OK, else -1.
Set the transmitted IRA (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Set the transmitted IRA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\param len The length of the address.
\return 0 for OK, else -1.
Set the transmitted ISP (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Set the transmitted ISP associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\param len The length of the address.
\return 0 for OK, else -1.
Set the transmitted NSC frame to be associated with a T.30 context.
\brief Set the transmitted NSC frame to be associated with a T.30 context.
\param s The T.30 context.
\param nsc A pointer to the frame.
\param len The length of the frame.
\return 0 for OK, else -1.
Set the transmitted NSF frame to be associated with a T.30 context.
\brief Set the transmitted NSF frame to be associated with a T.30 context.
\param s The T.30 context.
\param nsf A pointer to the frame.
\param len The length of the frame.
\return 0 for OK, else -1.
Set the transmitted NSS frame to be associated with a T.30 context.
\brief Set the transmitted NSS frame to be associated with a T.30 context.
\param s The T.30 context.
\param nss A pointer to the frame.
\param len The length of the frame.
\return 0 for OK, else -1.
Set the transmitted header information associated with a T.30 context.
\brief Set the transmitted header information associated with a T.30 context.
\param s The T.30 context.
\param info A pointer to the information string.
\return 0 for OK, else -1.
Set page header extends or overlays the image mode.
\brief Set page header overlay mode.
\param s The T.30 context.
\param header_overlays_image True for overlay, or false for extend the page.
Set the transmitted header timestamp timezone associated with a T.30 context.
\brief Set the transmitted header timestamp timezone associated with a T.30 context.
\param s The T.30 context.
\param info A pointer to the POSIZ timezone string.
\return 0 for OK, else -1.
Set the transmitted password (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Set the transmitted password associated with a T.30 context.
\param s The T.30 context.
\param password A pointer to the password.
\return 0 for OK, else -1.
Set the transmitted polled sub-address (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Set the transmitted polled sub-address associated with a T.30 context.
\param s The T.30 context.
\param polled_sub_address A pointer to the polled sub-address.
\return 0 for OK, else -1.
Set the transmitted selective polling address (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Set the transmitted selective polling address associated with a T.30 context.
\param s The T.30 context.
\param selective_polling_address A pointer to the selective polling address.
\return 0 for OK, else -1.
Set the transmitted sender ident (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Set the transmitted sender ident associated with a T.30 context.
\param s The T.30 context.
\param sender_ident A pointer to the sender ident.
\return 0 for OK, else -1.
Set the transmitted sub-address associated with a T.30 context.
\brief Set the transmitted sub-address associated with a T.30 context.
\param s The T.30 context.
\param sub_address A pointer to the sub-address.
\return 0 for OK, else -1.
Set the transmitted TSA (i.e. the one we will send to the far
end) associated with a T.30 context.
\brief Set the transmitted TSA associated with a T.30 context.
\param s The T.30 context.
\param type The type of address.
\param address A pointer to the address.
\param len The length of the address.
\return 0 for OK, else -1.
Report the passage of time to the T.30 engine.
\brief Report the passage of time to the T.30 engine.
\param s The T.30 context.
\param samples The time change in 1/8000th second steps.
Return the amount of free space in the AT COMMAND BUFFER.
\brief Return the amount of free space in the AT COMMAND BUFFER.
\param s The T.31 modem context.
\return The number of bytes of free space.
Get a pointer to the AT interpreter context associated with a T.31 context.
\brief Get a pointer to the AT interpreter context associated with a T.31 context.
\param s The T.31 context.
\return A pointer to the AT interpreter context, or NULL.
Get a pointer to the logging context associated with a T.31 context.
\brief Get a pointer to the logging context associated with a T.31 context.
\param s The T.31 context.
\return A pointer to the logging context, or NULL.
Get a pointer to the T.38 core context associated with a T.31 context.
\brief Get a pointer to the T.38 core context associated with a T.31 context.
\param s The T.31 context.
\return A pointer to the T.38 core context, or NULL.
Initialise a T.31 context. This must be called before the first
use of the context, to initialise its contents.
\brief Initialise a T.31 context.
\param s The T.31 context.
\param at_tx_handler A callback routine to handle AT interpreter channel output.
\param at_tx_user_data An opaque pointer passed in called to at_tx_handler.
\param modem_control_handler A callback routine to handle control of the modem (off-hook, etc).
\param modem_control_user_data An opaque pointer passed in called to modem_control_handler.
\param tx_t38_packet_handler ???
\param tx_t38_packet_user_data ???
\return A pointer to the T.31 context.
Process a block of received T.31 modem audio samples.
\brief Process a block of received T.31 modem audio samples.
\param s The T.31 modem context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of samples unprocessed.
Fake processing of a missing block of received T.31 modem audio samples
(e.g due to packet loss).
\brief Fake processing of a missing block of received T.31 modem audio samples.
\param s The T.31 modem context.
\param len The number of samples to fake.
\return The number of samples unprocessed.
Set audio or T.38 mode.
\brief Set audio or T.38 mode.
\param s The T.31 modem context.
\param t38_mode True for T.38 mode operation. False for audio mode operation.
Select whether T.38 data will be paced as it is transmitted.
\brief Select whether T.38 data will be paced.
\param s The T.31 modem context.
\param without_pacing True if data is to be sent as fast as possible. False if it is
to be paced.
Select whether TEP mode will be used (or time allowed for it (when transmitting).
\brief Select whether TEP mode will be used.
\param s The T.31 modem context.
\param use_tep True if TEP is to be used.
Select whether silent audio will be sent when transmit is idle.
\brief Select whether silent audio will be sent when transmit is idle.
\param s The T.31 modem context.
\param transmit_on_idle True if silent audio should be output when the transmitter is
idle. False to transmit zero length audio when the transmitter is idle. The default
behaviour is false.
Generate a block of T.31 modem audio samples.
\brief Generate a block of T.31 modem audio samples.
\param s The T.31 modem context.
\param amp The audio sample buffer.
\param max_len The number of samples to be generated.
\return The number of samples actually generated.
Decode a T.35 country code to a country name.
\brief Decode a T.35 country code to a country name.
\param country_code The country code.
\param country_code_extension The country code extension.
\return The country name, or NULL for an invalid country code.
Decode an NSF field to try to determine the make and model of the
remote machine.
\brief Decode an NSF field.
\param msg The NSF message.
\param len The length of the NSF message.
\param country A pointer which will be pointed to the identified country of origin.
If a NULL pointer is given, the country of origin will not be returned.
If the country of origin is not identified, NULL will be returned.
\param vendor A pointer which will be pointed to the identified vendor.
If a NULL pointer is given, the vendor ID will not be returned.
If the vendor is not identified, NULL will be returned.
\param model A pointer which will be pointed to the identified model.
If a NULL pointer is given, the model will not be returned.
If the model is not identified, NULL will be returned.
\return True if the machine was identified.
Resolve a T.35 country code its probable likely real value, using heuristics to try to resolve issues
of broken bit order in the country code.
\brief Resolve a T.35 country code with bit reversal resolution.
\param country_code The country code.
\param country_code_extension The country code extension.
\return The true country code, or -1 for an invalid code.
Decode a T.35 country code to a country name, using heuristics to try to resolve issues of broken bit order
in the country code.
\brief Decode a T.35 country code to a country name, with bit reversal resolution.
\param country_code The country code.
\param country_code_extension The country code extension.
\return The country name, or NULL for an invalid country code.
\brief Convert the code for a CM profile code to text description.
\param profile The profile code from a CM message.
\return A pointer to a short text description of the profile.
Get a pointer to the logging context associated with a T.38 context.
\brief Get a pointer to the logging context associated with a T.38 context.
\param s The T.38 context.
\return A pointer to the logging context, or NULL.
Initialise a T.38 core context.
\brief Initialise a T.38 core context.
\param s The T.38 context.
\param rx_indicator_handler Receive indicator handling routine.
\param rx_data_handler Receive data packet handling routine.
\param rx_rx_missing_handler Missing receive packet handling routine.
\param rx_packet_user_data An opaque pointer passed to the rx packet handling routines.
\param tx_packet_handler Packet transmit handling routine.
\param tx_packet_user_data An opaque pointer passed to the tx_packet_handler.
\return A pointer to the T.38 context, or NULL if there was a problem.
\brief Process a received T.38 IFP packet from an unreliable packet stream (e.g. UDPTL or RTP). This processing includes
packet sequence number checking, missing packet recovery, and skipping repeat packets.
\param s The T.38 context.
\param buf The packet contents.
\param len The length of the packet contents.
\param seq_no The packet sequence number.
\return 0 for OK, else -1.
\brief Process a received T.38 IFP packet from a reliable stream (e.g. TCP).
\param s The T.38 context.
\param buf The packet contents.
\param len The length of the packet contents.
\param seq_no The packet sequence number, used for logging purposes.
\return The length of the packet processed, or -1 if there is an error in the packet, or too few bytes of data to complete it.
\brief Send a data packet
\param s The T.38 context.
\param data_type The packet’s data type.
\param field_type The packet’s field type.
\param field The message data content for the packet.
\param field_len The length of the message data, in bytes.
\param category The category of the packet being sent. This should be one of the values defined for t38_packet_categories_e.
\return 0 for OK, else -1
\brief Send a data packet
\param s The T.38 context.
\param data_type The packet’s data type.
\param field The list of fields.
\param fields The number of fields in the list.
\param category The category of the packet being sent. This should be one of the values defined for t38_packet_categories_e.
\return 0 for OK, else -1
\brief Find the delay to allow for HDLC flags after sending an indicator
\param s The T.38 context.
\param indicator The indicator to check.
\return The delay to allow for initial HDLC flags after this indicator is sent.
\brief Send an indicator packet
\param s The T.38 context.
\param indicator The indicator to send.
\return The delay to allow after this indicator is sent.
\brief Find the delay to allow for modem training after sending an indicator
\param s The T.38 context.
\param indicator The indicator to check.
\return The delay to allow for modem training after this indicator is sent.
\brief Convert the code for a type of data to a short text name.
\param data_type The data type.
\return A pointer to a short text name for the data type.
\brief Convert the code for a type of data field to a short text name.
\param field_type The field type.
\return A pointer to a short text name for the field type.
Get a pointer to the logging context associated with a T.38 context.
\brief Get a pointer to the logging context associated with a T.38 context.
\param s The T.38 context.
\return A pointer to the logging context, or NULL.
Get a pointer to the T.38 core IFP packet engine associated with a
gateway mode T.38 context.
\brief Get a pointer to the T.38 core IFP packet engine associated
with a T.38 context.
\param s The T.38 context.
\return A pointer to the T.38 core context, or NULL.
Get the current transfer statistics for the current T.38 session.
\brief Get the current transfer statistics.
\param s The T.38 context.
\param t A pointer to a buffer for the statistics.
\brief Initialise a gateway mode T.38 context.
\param s The T.38 context.
\param tx_packet_handler A callback routine to encapsulate and transmit T.38 packets.
\param tx_packet_user_data An opaque pointer passed to the tx_packet_handler routine.
\return A pointer to the termination mode T.38 context, or NULL if there was a problem.
Process a block of received FAX audio samples.
\brief Process a block of received FAX audio samples.
\param s The T.38 context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of samples unprocessed.
Apply fake processing when a block of audio samples is missing (e.g due
to packet loss).
\brief Apply fake received audio processing.
\param s The T.38 context.
\param len The number of samples to fake.
\return The number of samples unprocessed. This should only be non-zero if
the software has reached the end of the FAX call.
Control whether error correcting mode (ECM) is allowed.
\brief Control whether error correcting mode (ECM) is allowed.
\param s The T.38 context.
\param ecm_allowed True is ECM is to be allowed.
Select whether non-ECM fill bits are to be removed during transmission.
\brief Select whether non-ECM fill bits are to be removed during transmission.
\param s The T.38 context.
\param remove True if fill bits are to be removed.
Select whether NSC, NSF, and NSS should be suppressed. It selected, the contents of
these messages are forced to zero for all octets beyond the message type. This makes
them look like manufacturer specific messages, from a manufacturer which does not exist.
\brief Select whether NSC, NSF, and NSS should be suppressed.
\param s The T.38 context.
\param from_t38 A string of bytes to overwrite the header of any NSC, NSF, and NSS
frames passing through the gateway from T.38 the the modem.
\param from_t38_len The length of the overwrite string.
\param from_modem A string of bytes to overwrite the header of any NSC, NSF, and NSS
frames passing through the gateway from the modem to T.38.
\param from_modem_len The length of the overwrite string.
Set a callback function for T.30 frame exchange monitoring. This is called from the heart
of the signal processing, so don’t take too long in the handler routine.
\brief Set a callback function for T.30 frame exchange monitoring.
\param s The T.30 context.
\param handler The callback function.
\param user_data An opaque pointer passed to the callback function.
Specify which modem types are supported by a T.30 context.
\brief Specify supported modems.
\param s The T.38 context.
\param supported_modems Bit field list of the supported modems.
Select whether talker echo protection tone will be sent for the image modems.
\brief Select whether TEP will be sent for the image modems.
\param s The T.38 context.
\param use_tep True if TEP should be sent.
Select whether silent audio will be sent when transmit is idle.
\brief Select whether silent audio will be sent when transmit is idle.
\param s The T.38 context.
\param transmit_on_idle True if silent audio should be output when the FAX transmitter is
idle. False to transmit zero length audio when the FAX transmitter is idle. The default
behaviour is false.
Generate a block of FAX audio samples.
\brief Generate a block of FAX audio samples.
\param s The T.38 context.
\param amp The audio sample buffer.
\param max_len The number of samples to be generated.
\return The number of samples actually generated.
\brief Convert the code for an indicator to a short text name.
\param indicator The type of indicator.
\return A pointer to a short text name for the indicator.
\brief Convert a JM message code to text description.
\param data The data field of the message.
\param len The length of the data field.
\return A pointer to a short text description of the profile.
\brief Get the next bit of data from a T.38 rate adapting non-ECM buffer context.
\param user_data The buffer context, cast to a void pointer.
\return The next bit, or one of the values indicating a change of modem status.
\brief Initialise a T.38 rate adapting non-ECM buffer context.
\param s The buffer context.
\param image_mode True for image data mode, or false for TCF mode.
\param bits The minimum number of bits per FAX image row.
\return A pointer to the buffer context, or NULL if there was a problem.
\brief Inject data to T.38 rate adapting non-ECM buffer context.
\param s The buffer context.
\param buf The data buffer to be injected.
\param len The length of the data to be injected.
\brief Inform a T.38 rate adapting non-ECM buffer context that the incoming data has finished,
and the contents of the buffer should be played out as quickly as possible.
\param s The buffer context.
\brief Report the input status of a T.38 rate adapting non-ECM buffer context to the specified
logging context.
\param s The buffer context.
\param logging The logging context.
\brief Report the output status of a T.38 rate adapting non-ECM buffer context to the specified
logging context.
\param s The buffer context.
\param logging The logging context.
\brief Set the mode of a T.38 rate adapting non-ECM buffer context.
\param s The buffer context.
\param mode True for image data mode, or false for TCF mode.
\param bits The minimum number of bits per FAX image row.
Set the method to be used for data rate management, as per the T.38 spec.
\param s The T.38 context.
\param method 1 for pass TCF across the T.38 link, 2 for handle TCF locally.
Set the maximum size of an IFP packet that is acceptable by the far end.
\param s The T.38 context.
\param max_datagram_size The maximum IFP packet length, in bytes.
\brief Send a data packet
\param s The T.38 context.
\param category The category of the packet being sent. This should be one of the values defined for t38_packet_categories_e.
\param setting The repeat count for the category. This should be at least one for all categories other an indicator packets.
Zero is valid for indicator packets, as it suppresses the sending of indicator packets, as an application using
TCP for the transport would require. As the setting is passed through to the transmission channel, additional
information may be encoded in it, such as the redundancy depth for the particular packet category.
Set the sequence number handling option.
\param s The T.38 context.
\param check True to check sequence numbers, and handle gaps reasonably. False
for no sequence number processing (e.g. for TPKT over TCP transport).
Get a pointer to the logging context associated with a T.38 context.
\brief Get a pointer to the logging context associated with a T.38 context.
\param s The T.38 context.
\return A pointer to the logging context, or NULL.
Get a pointer to the T.30 engine associated with a termination mode T.38 context.
\brief Get a pointer to the T.30 engine associated with a T.38 context.
\param s The T.38 context.
\return A pointer to the T.30 context, or NULL.
Get a pointer to the T.38 core IFP packet engine associated with a
termination mode T.38 context.
\brief Get a pointer to the T.38 core IFP packet engine associated
with a T.38 context.
\param s The T.38 context.
\return A pointer to the T.38 core context, or NULL.
\brief Initialise a termination mode T.38 context.
\param s The T.38 context.
\param calling_party True if the context is for a calling party. False if the
context is for an answering party.
\param tx_packet_handler A callback routine to encapsulate and transmit T.38 packets.
\param tx_packet_user_data An opaque pointer passed to the tx_packet_handler routine.
\return A pointer to the termination mode T.38 context, or NULL if there was a problem.
\brief Reinitialise a termination mode T.38 context.
\param s The T.38 context.
\param calling_party True if the context is for a calling party. False if the
context is for an answering party.
\return 0 for OK, else -1.
Select whether non-ECM fill bits are to be removed during transmission.
\brief Select whether non-ECM fill bits are to be removed during transmission.
\param s The T.38 context.
\param remove True if fill bits are to be removed.
Select whether the time for talker echo protection tone will be allowed for when sending.
\brief Select whether TEP time will be allowed for.
\param s The T.38 context.
\param use_tep True if TEP should be allowed for.
\brief Convert a V34rate message to an actual bit rate.
\param data The data field of the message.
\param len The length of the data field.
\return The bit rate, or -1 for a bad message.
Get the logging context associated with a T.42 decode context.
\brief Get the logging context associated with a T.42 decode context.
\param s The T.42 decode context.
\return A pointer to the logging context
\brief Prepare to decode an image in T.42 format.
\param s The T.42 context.
\param handler A callback routine to handle decoded image rows.
\param user_data An opaque pointer passed to handler.
\return A pointer to the context, or NULL if there was a problem.
\brief Decode a chunk of T.42 data.
\param s The T.42 context.
\param data The data to be decoded.
\param len The length of the data to be decoded.
\return 0 for OK.
\brief Set the comment handler routine.
\param s The T.42 context.
\param max_comment_len The maximum length of comment to be passed to the handler.
\param handler A callback routine to handle decoded comment.
\param user_data An opaque pointer passed to handler.
\return 0 for OK.
A maliciously constructed T.42 image could consume too much memory, and constitute
a denial of service attack on the system. This function allows constraints to be
applied.
\brief Set constraints on the received image size.
\param s The T.42 context.
\param max_xd The maximum permitted width of the full image, in pixels
\param max_yd The maximum permitted height of the full image, in pixels
\return 0 for OK
\brief Set the row handler routine.
\param s The T.42 context.
\param handler A callback routine to handle decoded image rows.
\param user_data An opaque pointer passed to handler.
\return 0 for OK.
Get the logging context associated with a T.42 encode context.
\brief Get the logging context associated with a T.42 encode context.
\param s The T.42 encode context.
\return A pointer to the logging context
\brief Check if we are at the end of the current document page.
\param s The T.42 context.
\return 0 for more data to come. SIG_STATUS_END_OF_DATA for no more data.
\brief Prepare to encode an image in T.42 format.
\param s The T.42 context.
\param image_width Image width, in pixels.
\param image_length Image length, in pixels.
\param handler A callback routine to handle encoded image rows.
\param user_data An opaque pointer passed to handler.
\return A pointer to the context, or NULL if there was a problem.
\brief Restart a T.42 encode context.
\param s The T.42 context.
\param image image_width The image width, in pixels.
\param image image_width The image length, in pixels.
\return 0 for success, otherwise -1.
Get the logging context associated with a T.43 decode context.
\brief Get the logging context associated with a T.43 decode context.
\param s The T.43 decode context.
\return A pointer to the logging context
\brief Prepare to decode an image in T.43 format.
\param s The T.43 context.
\param handler A callback routine to handle decoded image rows.
\param user_data An opaque pointer passed to handler.
\return A pointer to the context, or NULL if there was a problem.
\brief Decode a chunk of T.43 data.
\param s The T.43 context.
\param data The data to be decoded.
\param len The length of the data to be decoded.
\return 0 for OK.
\brief Set the comment handler routine.
\param s The T.43 context.
\param max_comment_len The maximum length of comment to be passed to the handler.
\param handler A callback routine to handle decoded comment.
\param user_data An opaque pointer passed to handler.
\return 0 for OK.
\brief Set the row handler routine.
\param s The T.43 context.
\param handler A callback routine to handle decoded image rows.
\param user_data An opaque pointer passed to handler.
\return 0 for OK.
Get the logging context associated with a T.43 encode context.
\brief Get the logging context associated with a T.43 encode context.
\param s The T.43 encode context.
\return A pointer to the logging context
\brief Check if we are at the end of the current document page.
\param s The T.43 context.
\return 0 for more data to come. SIG_STATUS_END_OF_DATA for no more data.
\brief Prepare to encode an image in T.43 format.
\param s The T.43 context.
\param image_width Image width, in pixels.
\param image_length Image length, in pixels.
\param handler A callback routine to handle encoded image rows.
\param user_data An opaque pointer passed to handler.
\return A pointer to the context, or NULL if there was a problem.
\brief Restart a T.43 encode context.
\param s The T.43 context.
\param image image_width The image width, in pixels.
\param image image_width The image length, in pixels.
\return 0 for success, otherwise -1.
Get the logging context associated with a T.85 decode context.
\brief Get the logging context associated with a T.85 decode context.
\param s The T.85 decode context.
\return A pointer to the logging context
\brief Prepare to decode an image in T.85 format.
\param s The T.85 context.
\param handler A callback routine to handle decoded image rows.
\param user_data An opaque pointer passed to handler.
\return A pointer to the context, or NULL if there was a problem.
\brief Decode a chunk of T.85 data.
\param s The T.85 context.
\param data The data to be decoded.
\param len The length of the data to be decoded.
\return 0 for OK.
After the final BIE byte has been delivered to t85_decode_put_xx(), it may still
return T85_MORE_DATA when the T85_VLENGTH option was used, and no NEWLEN
marker section has appeared yet. This is because such a BIE is not
self-terminating (i.e. there could still be a NEWLEN followed by an SDNORM
or SDRST at the very end of the final stripe, which needs to be processed
before the final row is output. See ITU-T Recommendation T.85, Appendix I).
Therefore, after the last byte has been delivered, call this routine to
signal the end of the BIE. This is necessary to allow the routine to finish
processing BIEs with option T85_VLENGTH that do not actually contain any
NEWLEN marker section.
\brief Inform the T.85 decode engine of a status change in the signal source (end
of tx, rx signal change, etc.).
\param s The T.85 context.
\param status The type of status change which occured.
\brief Set the comment handler routine.
\param s The T.85 context.
\param max_comment_len The maximum length of comment to be passed to the handler.
\param handler A callback routine to handle decoded comment.
\param user_data An opaque pointer passed to handler.
\return 0 for OK.
A maliciously constructed T.85 image could consume too much memory, and constitute
a denial of service attack on the system. This function allows constraints to be
applied.
\brief Set constraints on the received image size.
\param s The T.85 context.
\param max_xd The maximum permitted width of the full image, in pixels
\param max_yd The maximum permitted height of the full image, in pixels
\return 0 for OK
\brief Set the row handler routine.
\param s The T.85 context.
\param handler A callback routine to handle decoded image rows.
\param user_data An opaque pointer passed to handler.
\return 0 for OK.
\brief Insert a comment in the encoded file.
\param s The T.85 context.
\param comment The comment. Note that this is not a C string, and may contain any bytes.
\param len The length of the comment.
\brief Get the next chunk of the current document page. The document will
be padded for the current minimum scan line time.
\param s The T.85 context.
\param buf The buffer into which the chunk is to written.
\param max_len The maximum length of the chunk.
\return The actual length of the chunk. If this is less than max_len it
indicates that the end of the document has been reached.
Get the logging context associated with a T.85 encode context.
\brief Get the logging context associated with a T.85 encode context.
\param s The T.85 encode context.
\return A pointer to the logging context
\brief Check if we are at the end of the current document page.
\param s The T.85 context.
\return 0 for more data to come. SIG_STATUS_END_OF_DATA for no more data.
\brief Prepare to encode an image in T.85 format.
\param s The T.85 context.
\param image_width The image width, in pixels.
\param image_length The image length, in pixels.
\param handler A callback routine to handle encoded image rows.
\param user_data An opaque pointer passed to handler.
\return A pointer to the context, or NULL if there was a problem.
\brief Restart a T.85 encode context.
\param s The T.85 context.
\param image_width The image width, in pixels.
\param image_length The image length, in pixels.
\return 0 for success, otherwise -1.
\brief Alter the length of a T.85 encoded image. The new length cannot be greater than the
originally specified length. If the new length is less than the current length it
will be silently adjusted to the current length. Therefore, adjust the length to 1
will make the currently encoded length the final length.
\param s The T.85 context.
\param image_length The new image length, in pixels.
\return 0 if OK, or -1 if the request was not valid.
\brief Set the row read handler for a T.85 encode context.
\param s The T.85 context.
\param handler A pointer to the handler routine.
\param user_data An opaque pointer passed to the handler routine.
\return 0 for success, otherwise -1.
Time scale a chunk of audio samples.
\brief Time scale a chunk of audio samples.
\param s The time scale context.
\param out The output audio sample buffer. This must be large enough to accept
the longest possible result from processing the input data. See the
algorithm documentation for how the longest possible result may be calculated.
\param in The input audio sample buffer.
\param len The number of input samples.
\return The number of output samples.
Initialise a time scale context. This must be called before the first
use of the context, to initialise its contents.
\brief Initialise a time scale context.
\param s The time scale context.
\param sample_rate The sample rate of the signal.
\param playout_rate The ratio between the output speed and the input speed.
\return A pointer to the context, or NULL if there was a problem.
Find the maximum possible samples which could result from scaling the specified
number of input samples, at the current playback rate.
\brief Find the maximum possible output samples.
\param s The time scale context.
\param input_len The number of input samples.
\return The maximum possible output samples.
Change the time scale rate.
\brief Change the time scale rate.
\param s The time scale context.
\param playout_rate The ratio between the output speed and the input speed.
\return 0 if changed OK, else -1.
Create a tone generator descriptor
\brief Create a tone generator descriptor
\param s The descriptor
\param f1 The first frequency, in Hz
\param l1 The level of the first frequency, in dBm0
\param f2 0 for no second frequency, a positive number for the second frequency,
in Hz, or a negative number for an AM modulation frequency, in Hz
\param l2 The level of the second frequency, in dBm0, or the percentage modulation depth
for an AM modulated tone.
\param d1 x
\param d2 x
\param d3 x
\param d4 x
\param repeat x
\brief Transcode from u-law to A-law, using the procedure defined in G.711.
\param ulaw The u-law sample to transcode.
\return The best matching A-law value.
Decode a block of received V.8 audio samples. N.B. This is not the function to
call to run the V.8 protocol on received audio. It is for analysing audio streams,
to extract the V.8 messages, for monitoring or debug applications.
\brief Decode a block of received V.8 audio samples.
\param s The V.8 context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
Initialise a V.8 context.
\brief Initialise a V.8 context.
\param s The V.8 context.
\param calling_party True if caller mode, else answerer mode.
\param parms The allowed parameters for the call.
\param result_handler The callback routine used to handle the results of negotiation.
\param user_data An opaque pointer passed to the result_handler routine.
\return A pointer to the V.8 context, or NULL if there was a problem.
Log the list of supported modulations.
\brief Log the list of supported modulations.
\param s The V.8 context.
\param modulation_schemes The list of supported modulations.
Process a block of received V.8 audio samples.
\brief Process a block of received V.8 audio samples.
\param s The V.8 context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
Generate a block of V.8 audio samples.
\brief Generate a block of V.8 audio samples.
\param s The V.8 context.
\param amp The audio sample buffer.
\param max_len The number of samples to be generated.
\return The number of samples actually generated.
Process a block of received V.17 modem audio samples.
\brief Process a block of received V.17 modem audio samples.
\param s The modem context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of samples unprocessed.
Fake processing of a missing block of received V.17 modem audio samples.
(e.g due to packet loss).
\brief Fake processing of a missing block of received V.17 modem audio samples.
\param s The modem context.
\param len The number of samples to fake.
\return The number of samples unprocessed.
Get the logging context associated with a V.17 modem receive context.
\brief Get the logging context associated with a V.17 modem receive context.
\param s The modem context.
\return A pointer to the logging context
Initialise a V.17 modem receive context.
\brief Initialise a V.17 modem receive context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400.
\param put_bit The callback routine used to put the received data.
\param user_data An opaque pointer passed to the put_bit routine.
\return A pointer to the modem context, or NULL if there was a problem.
Reinitialise an existing V.17 modem receive context.
\brief Reinitialise an existing V.17 modem receive context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400.
\param short_train 0 if a long training sequence is expected.
1 if a short training sequence is expected.
2 if the expected training sequence is automatically selected.
\return 0 for OK, -1 for bad parameter
Change the modem status report function associated with a V.17 modem receive context.
\brief Change the modem status report function associated with a V.17 modem receive context.
\param s The modem context.
\param handler The callback routine used to report modem status changes.
\param user_data An opaque pointer.
Change the put_bit function associated with a V.17 modem receive context.
\brief Change the put_bit function associated with a V.17 modem receive context.
\param s The modem context.
\param put_bit The callback routine used to handle received bits.
\param user_data An opaque pointer.
Set a handler routine to process QAM status reports
\param s The modem context.
\param handler The handler routine.
\param user_data An opaque pointer passed to the handler routine.
Generate a block of V.17 modem audio samples.
\brief Generate a block of V.17 modem audio samples.
\param s The modem context.
\param amp The audio sample buffer.
\param len The number of samples to be generated.
\return The number of samples actually generated.
Get the logging context associated with a V.17 modem transmit context.
\brief Get the logging context associated with a V.17 modem transmit context.
\param s The modem context.
\return A pointer to the logging context
Initialise a V.17 modem transmit context. This must be called before the first
use of the context, to initialise its contents.
\brief Initialise a V.17 modem transmit context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400.
\param tep True is the optional TEP tone is to be transmitted.
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
\return A pointer to the modem context, or NULL if there was a problem.
Adjust a V.17 modem transmit context’s power output.
\brief Adjust a V.17 modem transmit context’s output power.
\param s The modem context.
\param power The power level, in dBm0
Reinitialise an existing V.17 modem transmit context, so it may be reused.
\brief Reinitialise an existing V.17 modem transmit context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400.
\param tep True is the optional TEP tone is to be transmitted.
\param short_train True if the short training sequence should be used.
\return 0 for OK, -1 for parameter error.
Change the get_bit function associated with a V.17 modem transmit context.
\brief Change the get_bit function associated with a V.17 modem transmit context.
\param s The modem context.
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
Change the modem status report function associated with a V.17 modem transmit context.
\brief Change the modem status report function associated with a V.17 modem transmit context.
\param s The modem context.
\param handler The callback routine used to report modem status changes.
\param user_data An opaque pointer.
Initialise a V.18 context.
\brief Initialise a V.18 context.
\param s The V.18 context.
\param calling_party True if caller mode, else answerer mode.
\param mode Mode of operation.
\param nation National variant for automoding.
\param put_msg A callback routine called to deliver the received text
to the application.
\param put_msg_user_data An opaque pointer for the put_msg callback routine.
\param status_handler A callback routine called to deliver status reports.
\param status_handler_user_data An opaque pointer for the status callback routine.
\return A pointer to the V.18 context, or NULL if there was a problem.
\brief Put a string to a V.18 context’s input buffer.
\param s The V.18 context.
\param msg The string to be added.
\param len The length of the string. If negative, the string is
assumed to be a NULL terminated string.
\return The number of characters actually added. This may be less than the
length of the digit string, if the buffer fills up. If the string is
invalid, this function will return -1.
Process a block of received V.18 audio samples.
\brief Process a block of received V.18 audio samples.
\param s The V.18 context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of unprocessed samples.
Fake processing of a missing block of received V.18 audio samples.
(e.g due to packet loss).
\brief Fake processing of a missing block of received V.18 audio samples.
\param s The V.18 context.
\param len The number of samples to fake.
\return The number of unprocessed samples.
\brief Set the stored message, as per V.18/5.2.12.1. This message may be up
to 80 bytes long.
\param s The V.18 context.
\param msg The string to be set.
Generate a block of V.18 audio samples.
\brief Generate a block of V.18 audio samples.
\param s The V.18 context.
\param amp The audio sample buffer.
\param max_len The number of samples to be generated.
\return The number of samples actually generated.
Report the current operating bit rate of a V.22bis modem context.
\brief Report the current operating bit rate of a V.22bis modem context
\param s The modem context.
Get the logging context associated with a V.22bis modem context.
\brief Get the logging context associated with a V.22bis modem context.
\param s The modem context.
\return A pointer to the logging context
Initialise a V.22bis modem context. This must be called before the first
use of the context, to initialise its contents.
\brief Initialise a V.22bis modem context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 1200 and 2400.
\param options Guard tone and other options.
\param calling_party True if this is the calling modem.
\param get_bit The callback routine used to get the data to be transmitted.
\param get_bit_user_data An opaque pointer, passed in calls to the get_bit routine.
\param put_bit The callback routine used to put the data received.
\param put_bit_user_data An opaque pointer, passed in calls to the put_bit routine.
\return A pointer to the modem context, or NULL if there was a problem.
Request a loopback 2 for a V.22bis modem context.
\brief Request a loopback 2 for a V.22bis modem context.
\param s The modem context.
\param enable True to enable loopback, or false to disable it.
\return 0 for OK, -1 for request reject.
Request a retrain for a V.22bis modem context. A rate change may also be requested.
\brief Request a retrain for a V.22bis modem context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 1200 and 2400.
\return 0 for OK, -1 for request rejected.
Reinitialise an existing V.22bis modem context, so it may be reused.
\brief Reinitialise an existing V.22bis modem context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 1200 and 2400.
\return 0 for OK, -1 for bad parameter.
Process a block of received V.22bis modem audio samples.
\brief Process a block of received V.22bis modem audio samples.
\param s The modem context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of samples unprocessed.
Fake processing of a missing block of received V.22bis modem audio samples.
(e.g due to packet loss).
\brief Fake processing of a missing block of received V.22bis modem audio samples.
\param s The modem context.
\param len The number of samples to fake.
\return The number of samples unprocessed.
Set a handler routine to process QAM status reports
\param s The modem context.
\param handler The handler routine.
\param user_data An opaque pointer passed to the handler routine.
Change the get_bit function associated with a V.22bis modem context.
\brief Change the get_bit function associated with a V.22bis modem context.
\param s The modem context.
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
Change the modem status report function associated with a V.22bis modem receive context.
\brief Change the modem status report function associated with a V.22bis modem receive context.
\param s The modem context.
\param handler The callback routine used to report modem status changes.
\param user_data An opaque pointer.
Change the get_bit function associated with a V.22bis modem context.
\brief Change the put_bit function associated with a V.22bis modem context.
\param s The modem context.
\param put_bit The callback routine used to process the data received.
\param user_data An opaque pointer.
Generate a block of V.22bis modem audio samples.
\brief Generate a block of V.22bis modem audio samples.
\param s The modem context.
\param amp The audio sample buffer.
\param len The number of samples to be generated.
\return The number of samples actually generated.
Adjust a V.22bis modem transmit context’s power output.
\brief Adjust a V.22bis modem transmit context’s output power.
\param s The modem context.
\param power The power level, in dBm0
Process a block of received V.27ter modem audio samples.
\brief Process a block of received V.27ter modem audio samples.
\param s The modem context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of samples unprocessed.
Fake processing of a missing block of received V.27ter modem audio samples.
(e.g due to packet loss).
\brief Fake processing of a missing block of received V.27ter modem audio samples.
\param s The modem context.
\param len The number of samples to fake.
\return The number of samples unprocessed.
Get the logging context associated with a V.27ter modem receive context.
\brief Get the logging context associated with a V.27ter modem receive context.
\param s The modem context.
\return A pointer to the logging context
Initialise a V.27ter modem receive context.
\brief Initialise a V.27ter modem receive context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 2400 and 4800.
\param put_bit The callback routine used to put the received data.
\param user_data An opaque pointer passed to the put_bit routine.
\return A pointer to the modem context, or NULL if there was a problem.
Reinitialise an existing V.27ter modem receive context.
\brief Reinitialise an existing V.27ter modem receive context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 2400 and 4800.
\param old_train True if a previous trained values are to be reused.
\return 0 for OK, -1 for bad parameter
Change the modem status report function associated with a V.27ter modem receive context.
\brief Change the modem status report function associated with a V.27ter modem receive context.
\param s The modem context.
\param handler The callback routine used to report modem status changes.
\param user_data An opaque pointer.
Change the put_bit function associated with a V.27ter modem receive context.
\brief Change the put_bit function associated with a V.27ter modem receive context.
\param s The modem context.
\param put_bit The callback routine used to handle received bits.
\param user_data An opaque pointer.
Set a handler routine to process QAM status reports
\param s The modem context.
\param handler The handler routine.
\param user_data An opaque pointer passed to the handler routine.
Generate a block of V.27ter modem audio samples.
\brief Generate a block of V.27ter modem audio samples.
\param s The modem context.
\param amp The audio sample buffer.
\param len The number of samples to be generated.
\return The number of samples actually generated.
Get the logging context associated with a V.27ter modem transmit context.
\brief Get the logging context associated with a V.27ter modem transmit context.
\param s The modem context.
\return A pointer to the logging context
Initialise a V.27ter modem transmit context.
\brief Initialise a V.27ter modem transmit context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 2400 and 4800.
\param tep True is the optional TEP tone is to be transmitted.
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
\return A pointer to the modem context, or NULL if there was a problem.
Adjust a V.27ter modem transmit context’s power output.
\brief Adjust a V.27ter modem transmit context’s output power.
\param s The modem context.
\param power The power level, in dBm0
Reinitialise an existing V.27ter modem transmit context, so it may be reused.
\brief Reinitialise an existing V.27ter modem transmit context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 2400 and 4800.
\param tep True is the optional TEP tone is to be transmitted.
\return 0 for OK, -1 for bad parameter
Change the get_bit function associated with a V.27ter modem transmit context.
\brief Change the get_bit function associated with a V.27ter modem transmit context.
\param s The modem context.
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
Change the modem status report function associated with a V.27ter modem transmit context.
\brief Change the modem status report function associated with a V.27ter modem transmit context.
\param s The modem context.
\param handler The callback routine used to report modem status changes.
\param user_data An opaque pointer.
Process a block of received V.29 modem audio samples.
\brief Process a block of received V.29 modem audio samples.
\param s The modem context.
\param amp The audio sample buffer.
\param len The number of samples in the buffer.
\return The number of samples unprocessed.
Fake processing of a missing block of received V.29 modem audio samples.
(e.g due to packet loss).
\brief Fake processing of a missing block of received V.29 modem audio samples.
\param s The modem context.
\param len The number of samples to fake.
\return The number of samples unprocessed.
Get the logging context associated with a V.29 modem receive context.
\brief Get the logging context associated with a V.29 modem receive context.
\param s The modem context.
\return A pointer to the logging context
Initialise a V.29 modem receive context.
\brief Initialise a V.29 modem receive context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 4800, 7200 and 9600.
\param put_bit The callback routine used to put the received data.
\param user_data An opaque pointer passed to the put_bit routine.
\return A pointer to the modem context, or NULL if there was a problem.
Reinitialise an existing V.29 modem receive context.
\brief Reinitialise an existing V.29 modem receive context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 4800, 7200 and 9600.
\param old_train True if a previous trained values are to be reused.
\return 0 for OK, -1 for bad parameter
Change the modem status report function associated with a V.29 modem receive context.
\brief Change the modem status report function associated with a V.29 modem receive context.
\param s The modem context.
\param handler The callback routine used to report modem status changes.
\param user_data An opaque pointer.
Change the put_bit function associated with a V.29 modem receive context.
\brief Change the put_bit function associated with a V.29 modem receive context.
\param s The modem context.
\param put_bit The callback routine used to handle received bits.
\param user_data An opaque pointer.
Set a handler routine to process QAM status reports
\param s The modem context.
\param handler The handler routine.
\param user_data An opaque pointer passed to the handler routine.
Generate a block of V.29 modem audio samples.
\brief Generate a block of V.29 modem audio samples.
\param s The modem context.
\param amp The audio sample buffer.
\param len The number of samples to be generated.
\return The number of samples actually generated.
Get the logging context associated with a V.29 modem transmit context.
\brief Get the logging context associated with a V.29 modem transmit context.
\param s The modem context.
\return A pointer to the logging context
Initialise a V.29 modem transmit context. This must be called before the first
use of the context, to initialise its contents.
\brief Initialise a V.29 modem transmit context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 4800, 7200 and 9600.
\param tep True is the optional TEP tone is to be transmitted.
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
\return A pointer to the modem context, or NULL if there was a problem.
Adjust a V.29 modem transmit context’s power output.
\brief Adjust a V.29 modem transmit context’s output power.
\param s The modem context.
\param power The power level, in dBm0
Reinitialise an existing V.29 modem transmit context, so it may be reused.
\brief Reinitialise an existing V.29 modem transmit context.
\param s The modem context.
\param bit_rate The bit rate of the modem. Valid values are 4800, 7200 and 9600.
\param tep True is the optional TEP tone is to be transmitted.
\return 0 for OK, -1 for bad parameter
Change the get_bit function associated with a V.29 modem transmit context.
\brief Change the get_bit function associated with a V.29 modem transmit context.
\param s The modem context.
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
Change the modem status report function associated with a V.29 modem transmit context.
\brief Change the modem status report function associated with a V.29 modem transmit context.
\param s The modem context.
\param handler The callback routine used to report modem status changes.
\param user_data An opaque pointer.
Get the logging context associated with a V.42 context.
\brief Get the logging context associated with a V.42 context.
\param s The V.42 context.
\return A pointer to the logging context
Initialise a V.42 context.
\param s The V.42 context.
\param calling_party True if caller mode, else answerer mode.
\param detect True to perform the V.42 detection, else go straight into LAP.M
\param iframe_get A callback function to handle received frames of data.
\param iframe_put A callback function to get frames of data for transmission.
\param user_data An opaque pointer passed to the frame handler routines.
\return ???
Set the busy status of the local end of a V.42 context.
\param s The V.42 context.
\param busy The new local end busy status.
\return The previous local end busy status.
Set the compression mode.
\param s The V.42bis context.
\param mode One of the V.42bis compression modes -
V42BIS_COMPRESSION_MODE_DYNAMIC,
V42BIS_COMPRESSION_MODE_ALWAYS,
V42BIS_COMPRESSION_MODE_NEVER
Decompress a block of octets.
\param s The V.42bis context.
\param buf The data to be decompressed.
\param len The length of the data buffer.
\return 0
Get the logging context associated with a V.42bis context.
\brief Get the logging context associated with a V.42bis context.
\param s The V.42bis context.
\return A pointer to the logging context
Initialise a V.42bis context.
\param s The V.42bis context.
\param negotiated_p0 The negotiated P0 parameter, from the V.42bis spec.
\param negotiated_p1 The negotiated P1 parameter, from the V.42bis spec.
\param negotiated_p2 The negotiated P2 parameter, from the V.42bis spec.
\param encode_handler Encode callback handler.
\param encode_user_data An opaque pointer passed to the encode callback handler.
\param max_encode_len The maximum length that should be passed to the encode handler.
\param decode_handler Decode callback handler.
\param decode_user_data An opaque pointer passed to the decode callback handler.
\param max_decode_len The maximum length that should be passed to the decode handler.
\return The V.42bis context.
Initialise a V.150.1 context. This must be called before the first use of the context, to
initialise its contents.
\brief Initialise a V.150.1 context.
\param s The V.150.1 context.
\param sprt_tx_packet_handler Callback routine to handle the transmission of SPRT packets.
\param sprt_tx_packet_handler_user_data An opaque pointer, passed in calls to the SPRT packet tx handler
\param sprt_tx_payload_type The payload type for transmitted SPRT packets.
\param sprt_rx_payload_type The payload type expected in received SPRT packets.
\param sse_tx_packet_handler Callback routine to handle the transmission of SSE packets.
\param sse_tx_packet_user_data An opaque pointer, passed in calls to the SSE tx packet handler
\param v150_1_timer_handler Callback routine to control SPRT, SSE and overall V.150.1 timers.
\param v150_1_timer_user_data An opaque pointer, passed in calls to the timer handler
\param rx_data_handler Callback routine to handle the octet stream from an SPRT interaction
\param rx_data_handler_user_data An opaque pointer, passed in calls to the rx octet handler.
\param rx_status_report_handler Callback routine for V.150.1 protocol status reports
\param rx_status_report_user_data An opaque pointer, passed in calls to the rx status report handler
\param spe_signal_handler
\param spe_signal_handler_user_data
\return A pointer to the V.150.1 context, or NULL if there was a problem.
Receive an SSE packet, broken out of an RTP stream.
\brief Receive an SSE packet.
\param s V.150.1 SSE context.
\param seq_no
\param timestamp
\param pkt
\param len
Select one of the reliability schemes from V.150.1/C.4.
\brief Select one of the reliability schemes from V.150.1/C.4.
\param s V.150.1 SSE context.
\param method The chosen method.
\param parm1 maximum transmissions.
\param parm2 delay between transmissions, or T0, in microseconds.
\param parm3 T1, in microseconds.
\return 0 for Ok, else negative.
Transmit an SSE packet, for insertion into an RTP packet. This is normally needed by an
application.
\brief Transmit an SSE packet.
\param s V.150.1 SSE context.
\param event
\param ric
\param ricinfo
\page g722_page G.722 encoding and decoding
\section g722_page_sec_1 What does it do?
The G.722 module is a bit exact implementation of the ITU G.722 specification for all three
specified bit rates - 64000bps, 56000bps and 48000bps. It passes the ITU tests.
Asynchronous data receive descriptor. This defines the state of a single
working instance of an asynchronous serial to byte converter, for use
in FSK modems.
Asynchronous data transmit descriptor. This defines the state of a single
working instance of a byte to asynchronous serial converter, for use
in FSK modems.
\page at_page AT command interpreter
\section at_page_sec_1 What does it do?
The AT interpreter module implements V.251, V.252, V.253, T.31 and various 3GPP
modem control commands.
IMA (DVI/Intel) ADPCM conversion state descriptor. This defines the state of
a single working instance of the IMA ADPCM converter. This is used for
either linear to ADPCM or ADPCM to linear conversion.
Oki (Dialogic) ADPCM conversion state descriptor. This defines the state of
a single working instance of the Oki ADPCM converter. This is used for
either linear to ADPCM or ADPCM to linear conversion.
\brief A timer variable large enough that when in microseconds it just
won’t overflow. Most things in spandsp are timed by audio samples,
but some things need access to global timers.
Length of the various supported paper sizes, in pixels at the various Y resolutions.
Paper sizes are
A4 (210mm x 297mm)
B4 (250mm x 353mm)
A3 (297mm x 420mm)
North American Letter (215.9mm x 279.4mm or 8.5“x11“)
North American Legal (215.9mm x 355.6mm or 8.4“x14“)
Unlimited
Exact widths in PELs for the difference resolutions, and page widths.
Note:
The A4 widths also apply to North American letter and legal.
The R4 resolution widths are not supported in recent versions of T.30
Only images of exactly these widths are acceptable for FAX transmisson.
This function is a callback from the image decoders, to read the unencoded bi-level image,
row by row. It is called for each row, with len set to the number of bytes per row expected.
\return len for OK, or zero to indicate the end of the image data.
This function is a callback from the image decoders, to write the decoded bi-level image,
row by row. It is called for each row, with len set to the number of bytes per row. At the
end of the image it is called with len set to zero, to indicate the end of image condition.
\return 0 for OK, or non-zero for a problem that requires the image be interrupted.
T.30 send document handler.
\brief T.30 send document handler.
\param user_data An opaque pointer.
\param msg The document chunk.
\param len The length of the chunk.
\return The actual length of the chunk.
T.30 deliver document handler.
\brief T.30 deliver handler.
\param user_data An opaque pointer.
\param msg The document chunk.
\param len The length of the chunk.
\return The delivery status.
I/O modes for the T.30 protocol.
These are allocated such that the lower 4 bits represents the variant of the modem - e.g. the
particular bit rate selected.
T.30 phase B callback handler. This handler can be used to process addition
information available in some FAX calls, such as passwords. The callback handler
can access whatever additional information might have been received, using
t30_get_received_info().
\brief T.30 phase B callback handler.
\param user_data An opaque pointer.
\param result The phase B event code.
\return The new status. Normally, T30_ERR_OK is returned.
T.30 phase D callback handler.
\brief T.30 phase D callback handler.
\param user_data An opaque pointer.
\param result The phase D event code.
\return The new status. Normally, T30_ERR_OK is returned.
T.30 phase E callback handler.
\brief T.30 phase E callback handler.
\param user_data An opaque pointer.
\param completion_code The phase E completion code.
T.30 real time frame handler.
\brief T.30 real time frame handler.
\param user_data An opaque pointer.
\param incoming True for incoming, false for outgoing.
\param msg The HDLC message.
\param len The length of the message.
T.30 send HDLC handler.
\brief T.30 send HDLC handler.
\param user_data An opaque pointer.
\param msg The HDLC message.
\param len The length of the message. -1 to flush the HDLC queue.
T.30 set a receive or transmit type handler.
\brief T.30 set a receive or transmit type handler.
\param user_data An opaque pointer.
\param type The modem, tone or silence to be sent or received.
\param bit_rate The bit rate of the modem to be sent or received.
\param short_train True if the short training sequence should be used (where one exists).
\param use_hdlc False for bit stream, true for HDLC framing.
T.38 gateway real time frame handler.
\brief T.38 gateway real time frame handler.
\param user_data An opaque pointer.
\param incoming True for incoming, false for outgoing.
\param msg The HDLC message.
\param len The length of the message.
\page tone_generation_page Tone generation
\section tone_generation_page_sec_1 What does it do?
The tone generation module provides for the generation of cadenced tones,
suitable for a wide range of telephony applications.