28#if !defined(_SPANDSP_T31_H_)
29#define _SPANDSP_T31_H_
45typedef int (*t31_modem_control_handler_t)(
t31_state_t *s,
void *user_data,
int op,
const char *num);
47#if defined(__cplusplus)
52SPAN_DECLARE(
void) t31_call_event(
t31_state_t *s,
int event);
60SPAN_DECLARE(
int) t31_at_rx(
t31_state_t *s,
const char *t,
int len);
87SPAN_DECLARE(
int) t31_t38_send_timeout(
t31_state_t *s,
int samples);
153 at_tx_handler_t at_tx_handler,
154 void *at_tx_user_data,
155 t31_modem_control_handler_t modem_control_handler,
156 void *modem_control_user_data,
157 t38_tx_packet_handler_t tx_t38_packet_handler,
158 void *tx_t38_packet_user_data);
172#if defined(__cplusplus)
Definition private/at_interpreter.h:45
Definition private/logging.h:34
Definition private/t31.h:175
bool t38_mode
Definition private/t31.h:183
Definition private/t38_core.h:33
void t31_set_tep_mode(t31_state_t *s, bool use_tep)
Select whether TEP mode will be used.
Definition t31.c:2886
int t31_release(t31_state_t *s)
Release a T.31 context.
Definition t31.c:3073
int t31_rx_fillin(t31_state_t *s, int len)
Fake processing of a missing block of received T.31 modem audio samples.
Definition t31.c:2825
at_state_t * t31_get_at_state(t31_state_t *s)
Get a pointer to the AT interpreter context associated with a T.31 context.
Definition t31.c:2933
int t31_tx(t31_state_t *s, int16_t amp[], int max_len)
Generate a block of T.31 modem audio samples.
Definition t31.c:2851
void t31_set_transmit_on_idle(t31_state_t *s, bool transmit_on_idle)
Select whether silent audio will be sent when transmit is idle.
Definition t31.c:2880
int t31_at_rx_free_space(t31_state_t *s)
Return the amount of free space in the AT COMMAND BUFFER.
Definition t31.c:2674
void t31_set_mode(t31_state_t *s, bool t38_mode)
Set audio or T.38 mode.
Definition t31.c:2920
int t31_rx(t31_state_t *s, int16_t amp[], int len)
Process a block of received T.31 modem audio samples.
Definition t31.c:2775
void t31_set_t38_config(t31_state_t *s, bool without_pacing)
Select whether T.38 data will be paced.
Definition t31.c:2892
int t31_free(t31_state_t *s)
Release a T.31 context.
Definition t31.c:3083
t38_core_state_t * t31_get_t38_core_state(t31_state_t *s)
Get a pointer to the T.38 core context associated with a T.31 context.
Definition t31.c:2939
logging_state_t * t31_get_logging_state(t31_state_t *s)
Get a pointer to the logging context associated with a T.31 context.
Definition t31.c:2927
t31_state_t * t31_init(t31_state_t *s, at_tx_handler_t at_tx_handler, void *at_tx_user_data, t31_modem_control_handler_t modem_control_handler, void *modem_control_user_data, t38_tx_packet_handler_t tx_t38_packet_handler, void *tx_t38_packet_user_data)
Initialise a T.31 context.
Definition t31.c:2979