Go to the documentation of this file.
30 #if !defined(_SPANDSP_MODEM_CONNECT_TONES_H_)
31 #define _SPANDSP_MODEM_CONNECT_TONES_H_
87 #define MODEM_CONNECT_TONES_FAX_CED MODEM_CONNECT_TONES_ANS
101 #if defined(__cplusplus)
173 SPAN_DECLARE(
const char *) modem_connect_tone_to_str(
int tone);
175 #if defined(__cplusplus)
int modem_connect_tones_rx_free(modem_connect_tones_rx_state_t *s)
Free an instance of the modem connect tones detector.
Definition: modem_connect_tones.c:760
@ MODEM_CONNECT_TONES_ANSAM_PR
The ANSam with phase reversals tone is a version of ANS_PR with 20% of 15Hz+-0.1Hz AM modulation,...
Definition: modem_connect_tones.h:72
int hop_timer
Countdown to the next phase hop.
Definition: private/modem_connect_tones.h:45
@ MODEM_CONNECT_TONES_FAX_CNG
CNG tone is a pure 1100Hz tone, in 0.5s bursts, with 3s silences in between. The bursts repeat for as...
Definition: modem_connect_tones.h:62
modem_connect_tones_rx_state_t * modem_connect_tones_rx_init(modem_connect_tones_rx_state_t *s, int tone_type, tone_report_func_t tone_callback, void *user_data)
Initialise an instance of the modem connect tones detector.
Definition: modem_connect_tones.c:706
int num_bits
The current number of bits in the octet in progress.
Definition: private/modem_connect_tones.h:95
int modem_connect_tones_tx_release(modem_connect_tones_tx_state_t *s)
Release an instance of the modem connect tones generator.
Definition: modem_connect_tones.c:351
int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
Generate an integer tone sample, with modulation.
Definition: dds_int.c:378
@ SIG_STATUS_CARRIER_UP
The carrier signal is up. This merely indicates that carrier energy has been seen....
Definition: async.h:58
float fsk_rx_signal_power(fsk_rx_state_t *s)
Definition: fsk.c:246
int32_t dds_phase_rate(float frequency)
Find the phase rate value to achieve a particular frequency.
Definition: dds_int.c:316
fsk_rx_state_t v21rx
A V.21 FSK modem context used when searching for FAX preamble.
Definition: private/modem_connect_tones.h:91
int modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s)
Test if a modem_connect tone has been detected.
Definition: modem_connect_tones.c:696
@ MODEM_CONNECT_TONES_CALLING_TONE
Calling tone is a pure 1300Hz tone, in 0.6s bursts, with 2s silences in between. The bursts repeat fo...
Definition: modem_connect_tones.h:83
int duration_timer
Maximum duration timer.
Definition: private/modem_connect_tones.h:47
int16_t dds_scaling_dbm0(float level)
Find the scaling factor needed to achieve a specified level in dBm0.
Definition: dds_int.c:328
@ MODEM_CONNECT_TONES_ANSAM
The ANSam tone is a version of ANS with 20% of 15Hz+-0.1Hz AM modulation, as per V....
Definition: modem_connect_tones.h:69
int32_t am_level
The 15Hz AM power estimate.
Definition: private/modem_connect_tones.h:77
@ MODEM_CONNECT_TONES_BELL_ANS
Bell ANS tone is a pure continuous 2225Hz+-15Hz tone for 3.3s+-0.7s.
Definition: modem_connect_tones.h:80
int32_t channel_level
The total channel power estimate.
Definition: private/modem_connect_tones.h:75
@ MODEM_CONNECT_TONES_ANS
ANS tone is a pure continuous 2100Hz+-15Hz tone for 3.3s+-0.7s.
Definition: modem_connect_tones.h:64
SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data)
Get the next bit of a transmitted serial bit stream.
@ MODEM_CONNECT_TONES_FAX_CED_OR_PREAMBLE
CED tone is the same as ANS tone. FAX preamble in a string of V.21 HDLC flag octets....
Definition: modem_connect_tones.h:78
int flags_seen
Number of consecutive flags seen so far.
Definition: private/modem_connect_tones.h:97
unsigned int raw_bit_stream
The raw (stuffed) bit stream buffer.
Definition: private/modem_connect_tones.h:93
@ MODEM_CONNECT_TONES_FAX_PREAMBLE
FAX preamble in a string of V.21 HDLC flag octets.
Definition: modem_connect_tones.h:74
int modem_connect_tones_tx_free(modem_connect_tones_tx_state_t *s)
Free an instance of the modem connect tones generator.
Definition: modem_connect_tones.c:357
tone_report_func_t tone_callback
Callback routine, using to report detection of the tone.
Definition: private/modem_connect_tones.h:62
SPAN_DECLARE_NONSTD(int) modem_connect_tones_tx(modem_connect_tones_tx_state_t *s
Generate a block of modem connect tones samples.
@ MODEM_CONNECT_TONES_NONE
This is reported when a tone stops.
Definition: modem_connect_tones.h:59
@ MODEM_CONNECT_TONES_ANS_PR
ANS with phase reversals tone is a 2100Hz+-15Hz tone for 3.3s+-0.7s, with a 180 degree phase jump eve...
Definition: modem_connect_tones.h:67
int32_t notch_level
The in notch power estimate.
Definition: private/modem_connect_tones.h:73
Definition: private/modem_connect_tones.h:37
int tone_present
TRUE is the tone is currently confirmed present in the audio.
Definition: private/modem_connect_tones.h:81
@ SIG_STATUS_CARRIER_DOWN
The carrier signal has dropped.
Definition: async.h:54
int framing_ok_announced
TRUE if framing OK has been announced.
Definition: private/modem_connect_tones.h:99
int modem_connect_tones_tx_free(modem_connect_tones_tx_state_t *s)
Free an instance of the modem connect tones generator.
Definition: modem_connect_tones.c:357
int tone_type
The tone type being detected.
Definition: private/modem_connect_tones.h:60
Definition: private/modem_connect_tones.h:57
#define HDLC_FRAMING_OK_THRESHOLD
Definition: t38_gateway.c:175
modem_connect_tones_tx_state_t * modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s, int tone_type)
Initialise an instance of the modem connect tones generator.
Definition: modem_connect_tones.c:253
float z15hz_1
The 15Hz AM filter state.
Definition: private/modem_connect_tones.h:70
fsk_rx_state_t * fsk_rx_init(fsk_rx_state_t *s, const fsk_spec_t *spec, int framing_mode, put_bit_func_t put_bit, void *user_data)
Initialise an FSK modem receive context.
Definition: fsk.c:314
void fsk_rx_signal_cutoff(fsk_rx_state_t *s, float cutoff)
Adjust an FSK modem receive context's carrier detect power threshold.
Definition: fsk.c:238
int modem_connect_tones_rx_release(modem_connect_tones_rx_state_t *s)
Release an instance of the modem connect tones detector.
Definition: modem_connect_tones.c:754
modem_connect_tones_tx_state_t * modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s, int tone_type)
Initialise an instance of the modem connect tones generator.
Definition: modem_connect_tones.c:253
int tone_cycle_duration
A millisecond counter, to time the duration of tone sections.
Definition: private/modem_connect_tones.h:85
float znotch_1
The notch filter state.
Definition: private/modem_connect_tones.h:67
int modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s)
Test if a modem_connect tone has been detected.
Definition: modem_connect_tones.c:696
int good_cycles
A count of the number of good cycles of tone reversal seen.
Definition: private/modem_connect_tones.h:87
int hit
TRUE if the tone has been seen since the last time the user tested for it.
Definition: private/modem_connect_tones.h:89
modem_connect_tones_rx_state_t * modem_connect_tones_rx_init(modem_connect_tones_rx_state_t *s, int tone_type, tone_report_func_t tone_callback, void *user_data)
Initialise an instance of the modem connect tones detector.
Definition: modem_connect_tones.c:706
int modem_connect_tones_tx_release(modem_connect_tones_tx_state_t *s)
Release an instance of the modem connect tones generator.
Definition: modem_connect_tones.c:351
int modem_connect_tones_rx_release(modem_connect_tones_rx_state_t *s)
Release an instance of the modem connect tones detector.
Definition: modem_connect_tones.c:754
void * callback_data
An opaque pointer passed to tone_callback.
Definition: private/modem_connect_tones.h:64
int modem_connect_tones_rx_free(modem_connect_tones_rx_state_t *s)
Free an instance of the modem connect tones detector.
Definition: modem_connect_tones.c:760