00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #if !defined(_SPANDSP_V8_H_)
00042 #define _SPANDSP_V8_H_
00043
00044 typedef struct v8_parms_s v8_parms_t;
00045
00046 typedef void (*v8_result_handler_t)(void *user_data, v8_parms_t *result);
00047
00048 enum v8_call_function_e
00049 {
00050 V8_CALL_TBS = 0,
00051 V8_CALL_H324 = 1,
00052 V8_CALL_V18 = 2,
00053 V8_CALL_T101 = 3,
00054 V8_CALL_T30_TX = 4,
00055 V8_CALL_T30_RX = 5,
00056 V8_CALL_V_SERIES = 6,
00057 V8_CALL_FUNCTION_EXTENSION = 7
00058 };
00059
00060 enum v8_modulation_e
00061 {
00062 V8_MOD_V17 = (1 << 0),
00063 V8_MOD_V21 = (1 << 1),
00064 V8_MOD_V22 = (1 << 2),
00065 V8_MOD_V23HDX = (1 << 3),
00066 V8_MOD_V23 = (1 << 4),
00067 V8_MOD_V26BIS = (1 << 5),
00068 V8_MOD_V26TER = (1 << 6),
00069 V8_MOD_V27TER = (1 << 7),
00070 V8_MOD_V29 = (1 << 8),
00071 V8_MOD_V32 = (1 << 9),
00072 V8_MOD_V34HDX = (1 << 10),
00073 V8_MOD_V34 = (1 << 11),
00074 V8_MOD_V90 = (1 << 12),
00075 V8_MOD_V92 = (1 << 13)
00076 };
00077
00078 enum v8_protocol_e
00079 {
00080 V8_PROTOCOL_NONE = 0,
00081 V8_PROTOCOL_LAPM_V42 = 1,
00082 V8_PROTOCOL_EXTENSION = 7
00083 };
00084
00085 enum v8_pstn_access_e
00086 {
00087 V8_PSTN_ACCESS_CALL_DCE_CELLULAR = 0x01,
00088 V8_PSTN_ACCESS_ANSWER_DCE_CELLULAR = 0x02,
00089 V8_PSTN_ACCESS_DCE_ON_DIGITAL = 0x04
00090 };
00091
00092 enum v8_pcm_modem_availability_e
00093 {
00094 V8_PSTN_PCM_MODEM_V90_V92_ANALOGUE = 0x01,
00095 V8_PSTN_PCM_MODEM_V90_V92_DIGITAL = 0x02,
00096 V8_PSTN_PCM_MODEM_V91 = 0x04
00097 };
00098
00099 enum v8_status_e
00100 {
00101
00102 V8_STATUS_IN_PROGRESS = 0,
00103
00104 V8_STATUS_V8_OFFERED = 1,
00105
00106
00107
00108 V8_STATUS_V8_CALL = 2,
00109
00110 V8_STATUS_NON_V8_CALL = 3,
00111
00112 V8_STATUS_FAILED = 4
00113 };
00114
00115 typedef struct v8_state_s v8_state_t;
00116
00117 struct v8_parms_s
00118 {
00119 int status;
00120 int modem_connect_tone;
00121 int send_ci;
00122 int v92;
00123 int call_function;
00124 unsigned int modulations;
00125 int protocol;
00126 int pstn_access;
00127 int pcm_modem_availability;
00128 int nsf;
00129 int t66;
00130 };
00131
00132 #if defined(__cplusplus)
00133 extern "C"
00134 {
00135 #endif
00136
00137 SPAN_DECLARE(int) v8_restart(v8_state_t *s,
00138 int calling_party,
00139 v8_parms_t *parms);
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149 SPAN_DECLARE(v8_state_t *) v8_init(v8_state_t *s,
00150 int calling_party,
00151 v8_parms_t *parms,
00152 v8_result_handler_t result_handler,
00153 void *user_data);
00154
00155
00156
00157
00158
00159 SPAN_DECLARE(int) v8_release(v8_state_t *s);
00160
00161
00162
00163
00164
00165 SPAN_DECLARE(int) v8_free(v8_state_t *s);
00166
00167 SPAN_DECLARE(logging_state_t *) v8_get_logging_state(v8_state_t *s);
00168
00169
00170
00171
00172
00173
00174
00175
00176 SPAN_DECLARE_NONSTD(int) v8_tx(v8_state_t *s, int16_t *amp, int max_len);
00177
00178
00179
00180
00181
00182
00183
00184 SPAN_DECLARE_NONSTD(int) v8_rx(v8_state_t *s, const int16_t *amp, int len);
00185
00186
00187
00188
00189
00190 SPAN_DECLARE(void) v8_log_supported_modulations(v8_state_t *s, int modulation_schemes);
00191
00192 SPAN_DECLARE(const char *) v8_call_function_to_str(int call_function);
00193 SPAN_DECLARE(const char *) v8_modulation_to_str(int modulation_scheme);
00194 SPAN_DECLARE(const char *) v8_protocol_to_str(int protocol);
00195 SPAN_DECLARE(const char *) v8_pstn_access_to_str(int pstn_access);
00196 SPAN_DECLARE(const char *) v8_nsf_to_str(int nsf);
00197 SPAN_DECLARE(const char *) v8_pcm_modem_availability_to_str(int pcm_modem_availability);
00198 SPAN_DECLARE(const char *) v8_t66_to_str(int t66);
00199
00200 #if defined(__cplusplus)
00201 }
00202 #endif
00203
00204 #endif
00205