t38_core.c File Reference

#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <time.h>
#include <string.h>
#include <tgmath.h>
#include <math.h>
#include "floating_fudge.h"
#include <assert.h>
#include <memory.h>
#include <tiffio.h>
#include "spandsp/telephony.h"
#include "spandsp/logging.h"
#include "spandsp/bit_operations.h"
#include "spandsp/t38_core.h"
#include "spandsp/private/logging.h"
#include "spandsp/private/t38_core.h"

Defines

#define ACCEPTABLE_SEQ_NO_OFFSET   2000

Functions

const char * t38_indicator_to_str (int indicator)
 Convert the code for an indicator to a short text name.
const char * t38_data_type_to_str (int data_type)
 Convert the code for a type of data to a short text name.
const char * t38_field_type_to_str (int field_type)
 Convert the code for a type of data field to a short text name.
const char * t38_cm_profile_to_str (int profile)
 Convert the code for a CM profile code to text description.
const char * t38_jm_to_str (const uint8_t *data, int len)
 Convert a JM message code to text description.
int t38_v34rate_to_bps (const uint8_t *data, int len)
 Convert a V34rate message to an actual bit rate.
 SPAN_DECLARE_NONSTD (int)
 Get the next bit of a transmitted serial bit stream.
int t38_core_send_indicator (t38_core_state_t *s, int indicator)
 Send an indicator packet.
int t38_core_send_flags_delay (t38_core_state_t *s, int indicator)
 Find the delay to allow for HDLC flags after sending an indicator.
int t38_core_send_training_delay (t38_core_state_t *s, int indicator)
 Find the delay to allow for modem training after sending an indicator.
int t38_core_send_data (t38_core_state_t *s, int data_type, int field_type, const uint8_t field[], int field_len, int category)
 Send a data packet.
int t38_core_send_data_multi_field (t38_core_state_t *s, int data_type, const t38_data_field_t field[], int fields, int category)
 Send a data packet.
void t38_set_data_rate_management_method (t38_core_state_t *s, int method)
void t38_set_data_transport_protocol (t38_core_state_t *s, int data_transport_protocol)
void t38_set_fill_bit_removal (t38_core_state_t *s, int fill_bit_removal)
void t38_set_mmr_transcoding (t38_core_state_t *s, int mmr_transcoding)
void t38_set_jbig_transcoding (t38_core_state_t *s, int jbig_transcoding)
void t38_set_max_buffer_size (t38_core_state_t *s, int max_buffer_size)
void t38_set_max_datagram_size (t38_core_state_t *s, int max_datagram_size)
void t38_set_t38_version (t38_core_state_t *s, int t38_version)
void t38_set_sequence_number_handling (t38_core_state_t *s, int check)
void t38_set_pace_transmission (t38_core_state_t *s, int pace_transmission)
void t38_set_tep_handling (t38_core_state_t *s, int allow_for_tep)
void t38_set_redundancy_control (t38_core_state_t *s, int category, int setting)
 Send a data packet.
void t38_set_fastest_image_data_rate (t38_core_state_t *s, int max_rate)
int t38_get_fastest_image_data_rate (t38_core_state_t *s)
logging_state_tt38_core_get_logging_state (t38_core_state_t *s)
 Get a pointer to the logging context associated with a T.38 context.
int t38_core_restart (t38_core_state_t *s)
 Restart a T.38 core context.
t38_core_state_tt38_core_init (t38_core_state_t *s, t38_rx_indicator_handler_t rx_indicator_handler, t38_rx_data_handler_t rx_data_handler, t38_rx_missing_handler_t rx_missing_handler, void *rx_user_data, t38_tx_packet_handler_t tx_packet_handler, void *tx_packet_user_data)
 Initialise a T.38 core context.
int t38_core_release (t38_core_state_t *s)
 Release a signaling tone transmitter context.
int t38_core_free (t38_core_state_t *s)
 Free a signaling tone transmitter context.

Detailed Description


Function Documentation

SPAN_DECLARE_NONSTD ( int   ) 

Get the next bit of a transmitted serial bit stream.

Get the next bit of data from a T.38 rate adapting non-ECM buffer context.

Get a bit of received non-ECM image data.

Get the next bit of a transmitted serial bit stream.

Parameters:
user_data An opaque point which must point to a transmitter context.
Returns:
the next bit, or PUTBIT_END_OF_DATA to indicate the data stream has ended.

Get the next bit of a transmitted serial bit stream.

Process a block of received V.8 audio samples.

Fake processing of a missing block of received V.29 modem audio samples.

Fake processing of a missing block of received V.27ter modem audio samples.

Generate a block of V.22bis modem audio samples.

Fake processing of a missing block of received V.22bis modem audio samples.

Process a block of received V.18 audio samples.

Fake processing of a missing block of received V.17 modem audio samples.

Generate a block of FAX audio samples.

Apply fake received audio processing.

Process a received T.38 IFP packet from a reliable stream (e.g. TCP).

Generate a block of T.31 modem audio samples.

Fake processing of a missing block of received T.31 modem audio samples.

Dummy receive fillin callback.

Dummy receive callback.

Process a block of samples through an instance of the modem connect tones detector.

Get the next sequence of bytes for transmission.

Get the next byte for transmission.

Fake processing of a missing block of received FSK modem audio samples.

Process a block of received FSK modem audio samples.

Apply T.30 transmit processing to generate a block of audio samples.

Apply fake T.30 receive processing when a block of audio samples is missing (e.g due to packet loss).

Parameters:
s The FAX context.
len The number of samples to fake.
Returns:
The number of samples unprocessed. This should only be non-zero if the software has reached the end of the FAX call.

Apply T.30 transmit processing to generate a block of audio samples.

Parameters:
s The FAX context.
amp The audio sample buffer.
max_len The number of samples to be generated.
Returns:
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.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of samples unprocessed.

Fake processing of a missing block of received FSK modem audio samples (e.g due to packet loss).

Parameters:
s The modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.
Parameters:
s A pointer to an HDLC transmitter context.
Returns:
The next byte for transmission.
Parameters:
s A pointer to an HDLC transmitter context.
buf The buffer for the data.
max_len The number of bytes to get.
Returns:
The number of bytes actually got.
Parameters:
s The context.
amp An array of signal samples.
len The number of samples in the array.
Returns:
The number of unprocessed samples.

A dummy routine to use as a receive callback, when we aren't really trying to process what is received. It just absorbs and ignores the data.

Parameters:
user_data The context.
amp The signal.buffer
len The length of the signal buffer
Returns:
0.

A dummy routine to use as a receive fillin callback, when we aren't really trying to process what is received. It just absorbs and ignores the request.

Parameters:
user_data The context.
len The length of the signal buffer
Returns:
0.

Fake processing of a missing block of received T.31 modem audio samples (e.g due to packet loss).

Parameters:
s The T.31 modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.

Generate a block of T.31 modem audio samples.

Parameters:
s The T.31 modem context.
amp The audio sample buffer.
max_len The number of samples to be generated.
Returns:
The number of samples actually generated.
Parameters:
s The T.38 context.
buf The packet contents.
len The length of the packet contents.
seq_no The packet sequence number, used for logging purposes.
Returns:
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.

Apply fake processing when a block of audio samples is missing (e.g due to packet loss).

Parameters:
s The T.38 context.
len The number of samples to fake.
Returns:
The number of samples unprocessed. This should only be non-zero if the software has reached the end of the FAX call.

Generate a block of FAX audio samples.

Parameters:
s The T.38 context.
amp The audio sample buffer.
max_len The number of samples to be generated.
Returns:
The number of samples actually generated.

Fake processing of a missing block of received V.17 modem audio samples. (e.g due to packet loss).

Parameters:
s The modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.

Process a block of received V.18 audio samples.

Parameters:
s The V.18 context.
amp The audio sample buffer.
len The number of samples in the buffer.

Fake processing of a missing block of received V.22bis modem audio samples. (e.g due to packet loss).

Parameters:
s The modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.

Generate a block of V.22bis modem audio samples.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples to be generated.
Returns:
The number of samples actually generated.

Fake processing of a missing block of received V.27ter modem audio samples. (e.g due to packet loss).

Parameters:
s The modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.

Fake processing of a missing block of received V.29 modem audio samples. (e.g due to packet loss).

Parameters:
s The modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.

Process a block of received V.8 audio samples.

Parameters:
s The V.8 context.
amp The audio sample buffer.
len The number of samples in the buffer.

Get the next bit of a transmitted serial bit stream.

Apply T.30 transmit processing to generate a block of audio samples.

Apply fake T.30 receive processing.

Apply T.30 receive processing to a block of audio samples.

Parameters:
s The FAX context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
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).

Parameters:
s The FAX context.
len The number of samples to fake.
Returns:
The number of samples unprocessed. This should only be non-zero if the software has reached the end of the FAX call.

Apply T.30 transmit processing to generate a block of audio samples.

Parameters:
s The FAX context.
amp The audio sample buffer.
max_len The number of samples to be generated.
Returns:
The number of samples actually generated. This will be zero when there is nothing to send.

Get the next bit of a transmitted serial bit stream.

Fake processing of a missing block of received FSK modem audio samples.

Process a block of received FSK modem audio samples.

Generate a block of FSK modem audio samples.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples to be generated.
Returns:
The number of samples actually generated.

Process a block of received FSK modem audio samples.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of samples unprocessed.

Fake processing of a missing block of received FSK modem audio samples (e.g due to packet loss).

Parameters:
s The modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.

Get the next bit of a transmitted serial bit stream.

Get the next sequence of bytes for transmission.

Get the next byte for transmission.

Parameters:
s A pointer to an HDLC transmitter context.
Returns:
The next bit for transmission.
Parameters:
s A pointer to an HDLC transmitter context.
Returns:
The next byte for transmission.
Parameters:
s A pointer to an HDLC transmitter context.
buf The buffer for the data.
max_len The number of bytes to get.
Returns:
The number of bytes actually got.

Get the next bit of a transmitted serial bit stream.

Process a block of samples through an instance of the modem connect tones detector.

Parameters:
s The context.
amp An array of signal samples.
len The number of samples to generate.
Returns:
The number of samples generated.
Parameters:
s The context.
amp An array of signal samples.
len The number of samples in the array.
Returns:
The number of unprocessed samples.

Get the next bit of a transmitted serial bit stream.

Dummy receive fillin callback.

Dummy receive callback.

Generate a block of silent audio samples.

Parameters:
s The silence generator context.
amp The audio sample buffer.
max_len The number of samples to be generated.
Returns:
The number of samples actually generated. This will be zero when there is nothing to send.

A dummy routine to use as a receive callback, when we aren't really trying to process what is received. It just absorbs and ignores the data.

Parameters:
user_data The context.
amp The signal.buffer
len The length of the signal buffer
Returns:
0.

A dummy routine to use as a receive fillin callback, when we aren't really trying to process what is received. It just absorbs and ignores the request.

Parameters:
user_data The context.
len The length of the signal buffer
Returns:
0.

Get the next bit of a transmitted serial bit stream.

Generate a block of T.31 modem audio samples.

Fake processing of a missing block of received T.31 modem audio samples.

Process a block of received T.31 modem audio samples.

Parameters:
s The T.31 modem context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of samples unprocessed.

Fake processing of a missing block of received T.31 modem audio samples (e.g due to packet loss).

Parameters:
s The T.31 modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.

Generate a block of T.31 modem audio samples.

Parameters:
s The T.31 modem context.
amp The audio sample buffer.
max_len The number of samples to be generated.
Returns:
The number of samples actually generated.

Get the next bit of a transmitted serial bit stream.

Process a received T.38 IFP packet from a reliable stream (e.g. TCP).

Parameters:
s The T.38 context.
buf The packet contents.
len The length of the packet contents.
seq_no The packet sequence number.
Returns:
0 for OK, else -1.
Parameters:
s The T.38 context.
buf The packet contents.
len The length of the packet contents.
seq_no The packet sequence number, used for logging purposes.
Returns:
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.

Get the next bit of a transmitted serial bit stream.

Generate a block of FAX audio samples.

Apply fake received audio processing.

Process a block of received FAX audio samples.

Parameters:
s The T.38 context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of samples unprocessed.

Apply fake processing when a block of audio samples is missing (e.g due to packet loss).

Parameters:
s The T.38 context.
len The number of samples to fake.
Returns:
The number of samples unprocessed. This should only be non-zero if the software has reached the end of the FAX call.

Generate a block of FAX audio samples.

Parameters:
s The T.38 context.
amp The audio sample buffer.
max_len The number of samples to be generated.
Returns:
The number of samples actually generated.

Get the next bit of a transmitted serial bit stream.

Fake processing of a missing block of received V.17 modem audio samples.

Process a block of received V.17 modem audio samples.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of samples unprocessed.

Fake processing of a missing block of received V.17 modem audio samples. (e.g due to packet loss).

Parameters:
s The modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.

Get the next bit of a transmitted serial bit stream.

Generate a block of V.17 modem audio samples.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples to be generated.
Returns:
The number of samples actually generated.

Get the next bit of a transmitted serial bit stream.

Process a block of received V.18 audio samples.

Generate a block of V.18 audio samples.

Parameters:
s The V.18 context.
amp The audio sample buffer.
max_len The number of samples to be generated.
Returns:
The number of samples actually generated.

Process a block of received V.18 audio samples.

Parameters:
s The V.18 context.
amp The audio sample buffer.
len The number of samples in the buffer.

Get the next bit of a transmitted serial bit stream.

Generate a block of V.22bis modem audio samples.

Fake processing of a missing block of received V.22bis modem audio samples.

Process a block of received V.22bis modem audio samples.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of samples unprocessed.

Fake processing of a missing block of received V.22bis modem audio samples. (e.g due to packet loss).

Parameters:
s The modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.

Generate a block of V.22bis modem audio samples.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples to be generated.
Returns:
The number of samples actually generated.

Get the next bit of a transmitted serial bit stream.

Fake processing of a missing block of received V.27ter modem audio samples.

Process a block of received V.27ter modem audio samples.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of samples unprocessed.

Fake processing of a missing block of received V.27ter modem audio samples. (e.g due to packet loss).

Parameters:
s The modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.

Get the next bit of a transmitted serial bit stream.

Generate a block of V.27ter modem audio samples.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples to be generated.
Returns:
The number of samples actually generated.

Get the next bit of a transmitted serial bit stream.

Fake processing of a missing block of received V.29 modem audio samples.

Process a block of received V.29 modem audio samples.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of samples unprocessed.

Fake processing of a missing block of received V.29 modem audio samples. (e.g due to packet loss).

Parameters:
s The modem context.
len The number of samples to fake.
Returns:
The number of samples unprocessed.

Get the next bit of a transmitted serial bit stream.

Generate a block of V.29 modem audio samples.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples to be generated.
Returns:
The number of samples actually generated.

Get the next bit of a transmitted serial bit stream.

Process a block of received V.8 audio samples.

Generate a block of V.8 audio samples.

Parameters:
s The V.8 context.
amp The audio sample buffer.
max_len The number of samples to be generated.
Returns:
The number of samples actually generated.

Process a block of received V.8 audio samples.

Parameters:
s The V.8 context.
amp The audio sample buffer.
len The number of samples in the buffer.

References span_log().

const char* t38_cm_profile_to_str ( int  profile  ) 

Convert the code for a CM profile code to text description.

Parameters:
profile The profile code from a CM message.
Returns:
A pointer to a short text description of the profile.
int t38_core_free ( t38_core_state_t s  ) 

Free a signaling tone transmitter context.

Free a signaling tone transmitter context.

Parameters:
s The T.38 context.
Returns:
0 for OK
logging_state_t* t38_core_get_logging_state ( t38_core_state_t s  ) 

Get a pointer to the logging context associated with a T.38 context.

Get a pointer to the logging context associated with a T.38 context.

Parameters:
s The T.38 context.
Returns:
A pointer to the logging context, or NULL.
t38_core_state_t* t38_core_init ( t38_core_state_t s,
t38_rx_indicator_handler_t  rx_indicator_handler,
t38_rx_data_handler_t  rx_data_handler,
t38_rx_missing_handler_t  rx_missing_handler,
void *  rx_user_data,
t38_tx_packet_handler_t  tx_packet_handler,
void *  tx_packet_user_data 
)

Initialise a T.38 core context.

Initialise a T.38 core context.

Parameters:
s The T.38 context.
rx_indicator_handler Receive indicator handling routine.
rx_data_handler Receive data packet handling routine.
rx_rx_missing_handler Missing receive packet handling routine.
rx_packet_user_data An opaque pointer passed to the rx packet handling routines.
tx_packet_handler Packet transmit handling routine.
tx_packet_user_data An opaque pointer passed to the tx_packet_handler.
Returns:
A pointer to the T.38 context, or NULL if there was a problem.

References t38_core_restart(), T38_PACKET_CATEGORY_CONTROL_DATA, T38_PACKET_CATEGORY_CONTROL_DATA_END, T38_PACKET_CATEGORY_IMAGE_DATA, T38_PACKET_CATEGORY_IMAGE_DATA_END, and T38_PACKET_CATEGORY_INDICATOR.

int t38_core_release ( t38_core_state_t s  ) 

Release a signaling tone transmitter context.

Release a signaling tone transmitter context.

Parameters:
s The T.38 context.
Returns:
0 for OK
int t38_core_restart ( t38_core_state_t s  ) 

Restart a T.38 core context.

Restart a T.38 core context.

Parameters:
s The T.38 context.
Returns:
0 for OK, else -1.

Referenced by t38_core_init().

int t38_core_send_data ( t38_core_state_t s,
int  data_type,
int  field_type,
const uint8_t  field[],
int  field_len,
int  category 
)

Send a data packet.

Parameters:
s The T.38 context.
data_type The packet's data type.
field_type The packet's field type.
field The message data content for the packet.
field_len The length of the message data, in bytes.
category The category of the packet being sent. This should be one of the values defined for t38_packet_categories_e.
Returns:
0 for OK, else -1

References t38_data_field_t::field, t38_data_field_t::field_len, t38_data_field_t::field_type, and span_log().

int t38_core_send_data_multi_field ( t38_core_state_t s,
int  data_type,
const t38_data_field_t  field[],
int  fields,
int  category 
)

Send a data packet.

Parameters:
s The T.38 context.
data_type The packet's data type.
field The list of fields.
fields The number of fields in the list.
category The category of the packet being sent. This should be one of the values defined for t38_packet_categories_e.
Returns:
0 for OK, else -1

References span_log().

int t38_core_send_flags_delay ( t38_core_state_t s,
int  indicator 
)

Find the delay to allow for HDLC flags after sending an indicator.

Parameters:
s The T.38 context.
indicator The indicator to check.
Returns:
The delay to allow for initial HDLC flags after this indicator is sent.
int t38_core_send_indicator ( t38_core_state_t s,
int  indicator 
)

Send an indicator packet.

Parameters:
s The T.38 context.
indicator The indicator to send.
Returns:
The delay to allow after this indicator is sent.

References span_log(), t38_indicator_to_str(), and T38_PACKET_CATEGORY_INDICATOR.

int t38_core_send_training_delay ( t38_core_state_t s,
int  indicator 
)

Find the delay to allow for modem training after sending an indicator.

Parameters:
s The T.38 context.
indicator The indicator to check.
Returns:
The delay to allow for modem training after this indicator is sent.
const char* t38_data_type_to_str ( int  data_type  ) 

Convert the code for a type of data to a short text name.

Parameters:
data_type The data type.
Returns:
A pointer to a short text name for the data type.
const char* t38_field_type_to_str ( int  field_type  ) 

Convert the code for a type of data field to a short text name.

Parameters:
field_type The field type.
Returns:
A pointer to a short text name for the field type.
const char* t38_indicator_to_str ( int  indicator  ) 

Convert the code for an indicator to a short text name.

Parameters:
indicator The type of indicator.
Returns:
A pointer to a short text name for the indicator.

Referenced by t38_core_send_indicator().

const char* t38_jm_to_str ( const uint8_t *  data,
int  len 
)

Convert a JM message code to text description.

Parameters:
data The data field of the message.
len The length of the data field.
Returns:
A pointer to a short text description of the profile.
void t38_set_data_rate_management_method ( t38_core_state_t s,
int  method 
)

Set the method to be used for data rate management, as per the T.38 spec.

Parameters:
s The T.38 context.
method 1 for pass TCF across the T.38 link, 2 for handle TCF locally.
void t38_set_data_transport_protocol ( t38_core_state_t s,
int  data_transport_protocol 
)

Set the data transport protocol.

Parameters:
s The T.38 context.
data_transport_protocol UDPTL, RTP or TPKT.
void t38_set_fill_bit_removal ( t38_core_state_t s,
int  fill_bit_removal 
)

Set the non-ECM fill bit removal mode.

Parameters:
s The T.38 context.
fill_bit_removal TRUE to remove fill bits across the T.38 link, else FALSE.
void t38_set_jbig_transcoding ( t38_core_state_t s,
int  jbig_transcoding 
)

Set the JBIG transcoding mode.

Parameters:
s The T.38 context.
jbig_transcoding TRUE to transcode to JBIG across the T.38 link, else FALSE.
void t38_set_max_buffer_size ( t38_core_state_t s,
int  max_buffer_size 
)

Set the maximum buffer size for received data at the far end.

Parameters:
s The T.38 context.
max_buffer_size The maximum buffer size.
void t38_set_max_datagram_size ( t38_core_state_t s,
int  max_datagram_size 
)

Set the maximum size of an IFP packet that is acceptable by the far end.

Parameters:
s The T.38 context.
max_datagram_size The maximum IFP packet length, in bytes.
void t38_set_mmr_transcoding ( t38_core_state_t s,
int  mmr_transcoding 
)

Set the MMR transcoding mode.

Parameters:
s The T.38 context.
mmr_transcoding TRUE to transcode to MMR across the T.38 link, else FALSE.
void t38_set_redundancy_control ( t38_core_state_t s,
int  category,
int  setting 
)

Send a data packet.

Parameters:
s The T.38 context.
category The category of the packet being sent. This should be one of the values defined for t38_packet_categories_e.
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.

Referenced by t31_set_t38_config(), and t38_terminal_set_config().

void t38_set_sequence_number_handling ( t38_core_state_t s,
int  check 
)

Set the sequence number handling option.

Parameters:
s The T.38 context.
check TRUE to check sequence numbers, and handle gaps reasonably. FALSE for no sequence number processing (e.g. for TPKT over TCP transport).
void t38_set_t38_version ( t38_core_state_t s,
int  t38_version 
)

Set the T.38 version to be emulated.

Parameters:
s The T.38 context.
t38_version Version number, as in the T.38 spec.
void t38_set_tep_handling ( t38_core_state_t s,
int  allow_for_tep 
)

Set the TEP handling option.

Parameters:
s The T.38 context.
allow_for_tep TRUE to allow for TEP playout, else FALSE.

Referenced by t38_terminal_set_tep_mode().

int t38_v34rate_to_bps ( const uint8_t *  data,
int  len 
)

Convert a V34rate message to an actual bit rate.

Parameters:
data The data field of the message.
len The length of the data field.
Returns:
The bit rate, or -1 for a bad message.

Generated on 15 Sep 2012 for spandsp by  doxygen 1.6.1