34 #if !defined(_SPANDSP_V18_H_) 35 #define _SPANDSP_V18_H_ 41 V18_MODE_NONE = 0x0001,
43 V18_MODE_WEITBRECHT_5BIT_4545 = 0x0002,
45 V18_MODE_WEITBRECHT_5BIT_50 = 0x0004,
47 V18_MODE_DTMF = 0x0008,
49 V18_MODE_EDT = 0x0010,
51 V18_MODE_BELL103 = 0x0020,
53 V18_MODE_V23VIDEOTEX = 0x0040,
55 V18_MODE_V21TEXTPHONE = 0x0080,
57 V18_MODE_V18TEXTPHONE = 0x0100,
59 V18_MODE_WEITBRECHT_5BIT_476 = 0x0200,
61 V18_MODE_REPETITIVE_SHIFTS_OPTION = 0x1000
65 enum v18_autobauding_modes_e
67 V18_AUTOMODING_GLOBAL = 0,
72 V18_AUTOMODING_AUSTRALIA,
73 V18_AUTOMODING_IRELAND,
76 V18_AUTOMODING_GERMANY,
77 V18_AUTOMODING_SWITZERLAND,
80 V18_AUTOMODING_AUSTRIA,
83 V18_AUTOMODING_NETHERLANDS,
86 V18_AUTOMODING_ICELAND,
87 V18_AUTOMODING_NORWAY,
88 V18_AUTOMODING_SWEDEN,
89 V18_AUTOMODING_FINALND,
90 V18_AUTOMODING_DENMARK,
99 V18_AUTOMODING_FRANCE,
100 V18_AUTOMODING_BELGIUM,
107 V18_STATUS_SWITCH_TO_NONE,
108 V18_STATUS_SWITCH_TO_WEITBRECHT_5BIT_4545,
109 V18_STATUS_SWITCH_TO_WEITBRECHT_5BIT_476,
110 V18_STATUS_SWITCH_TO_WEITBRECHT_5BIT_50,
111 V18_STATUS_SWITCH_TO_DTMF,
112 V18_STATUS_SWITCH_TO_EDT,
113 V18_STATUS_SWITCH_TO_BELL103,
114 V18_STATUS_SWITCH_TO_V23VIDEOTEX,
115 V18_STATUS_SWITCH_TO_V21TEXTPHONE,
116 V18_STATUS_SWITCH_TO_V18TEXTPHONE
119 #if defined(__cplusplus) 143 void *put_msg_user_data,
145 void *status_handler_user_data);
214 SPAN_DECLARE(
const char *) v18_status_to_str(
int status);
216 #if defined(__cplusplus) bool calling_party
True if we are the calling modem.
Definition: private/v18.h:72
int v18_tx(v18_state_t *s, int16_t amp[], int max_len)
Generate a block of V.18 audio samples.
int v18_set_stored_message(v18_state_t *s, const char *msg)
Set the stored message, as per V.18/5.2.12.1. This message may be up to 80 bytes long.
Definition: v18.c:2047
void(* span_modem_status_func_t)(void *user_data, int status)
Definition: async.h:131
int v18_rx_fillin(v18_state_t *s, int len)
Fake processing of a missing block of received V.18 audio samples.
Definition: v18.c:1943
void(* span_put_msg_func_t)(void *user_data, const uint8_t *msg, int len)
Definition: async.h:107
int v18_rx(v18_state_t *s, const int16_t amp[], int len)
Process a block of received V.18 audio samples.
Definition: v18.c:1874
int v18_release(v18_state_t *s)
Release a V.18 context.
Definition: v18.c:2118
Definition: private/logging.h:33
int v18_get_current_mode(v18_state_t *s)
Get the current mode of a V.18 connection.
Definition: v18.c:2019
int v18_put(v18_state_t *s, const char msg[], int len)
Put a string to a V.18 context's input buffer.
Definition: v18.c:1990
v18_state_t * v18_init(v18_state_t *s, bool calling_party, int mode, int nation, span_put_msg_func_t put_msg, void *put_msg_user_data, span_modem_status_func_t status_handler, void *status_handler_user_data)
Initialise a V.18 context.
Definition: v18.c:2054
int v18_free(v18_state_t *s)
Release a V.18 context.
Definition: v18.c:2125
const char * v18_mode_to_str(int mode)
Return a short name for a V.18 mode.
Definition: v18.c:710
Definition: private/v18.h:69