| spandsp 0.0.6
    | 
Go to the source code of this file.
| Macros | |
| #define | MCLASS_VISUAL_INDICATOR 0x0B | 
| #define | JCLIP_MDMF_CALLERID 0x40 | 
| #define | CLIP_DTMF_HASH_TERMINATED '#' | 
| #define | CLIP_DTMF_C_TERMINATED 'C' | 
| #define | CLIP_DTMF_HASH_CALLER_NUMBER 'A' | 
| #define | CLIP_DTMF_HASH_ABSENCE 'D' | 
| #define | CLIP_DTMF_HASH_UNSPECIFIED 0 | 
| #define | CLIP_DTMF_C_CALLER_NUMBER 'A' | 
| #define | CLIP_DTMF_C_REDIRECT_NUMBER 'D' | 
| #define | CLIP_DTMF_C_ABSENCE 'B' | 
| Typedefs | |
| typedef struct adsi_tx_state_s | adsi_tx_state_t | 
| typedef struct adsi_rx_state_s | adsi_rx_state_t | 
| Functions | |
| logging_state_t * | adsi_rx_get_logging_state (adsi_rx_state_t *s) | 
| Get the logging context associated with an ADSI receive context. | |
| adsi_rx_state_t * | adsi_rx_init (adsi_rx_state_t *s, int standard, put_msg_func_t put_msg, void *user_data) | 
| Initialise an ADSI receive context. | |
| int | adsi_rx_release (adsi_rx_state_t *s) | 
| Release an ADSI receive context. | |
| int | adsi_rx_free (adsi_rx_state_t *s) | 
| Free the resources of an ADSI receive context. | |
| int | adsi_rx (adsi_rx_state_t *s, const int16_t amp[], int len) | 
| Receive a chunk of ADSI audio. | |
| adsi_tx_state_t * | adsi_tx_init (adsi_tx_state_t *s, int standard) | 
| Initialise an ADSI transmit context. | |
| int | adsi_tx_release (adsi_tx_state_t *s) | 
| Release an ADSI transmit context. | |
| int | adsi_tx_free (adsi_tx_state_t *s) | 
| Free the resources of an ADSI transmit context. | |
| void | adsi_tx_set_preamble (adsi_tx_state_t *s, int preamble_len, int preamble_ones_len, int postamble_ones_len, int stop_bits) | 
| Adjust the preamble associated with an ADSI transmit context. | |
| int | adsi_tx (adsi_tx_state_t *s, int16_t amp[], int max_len) | 
| Generate a block of ADSI audio samples. | |
| void | adsi_tx_send_alert_tone (adsi_tx_state_t *s) | 
| Request generation of an ADSI alert tone. | |
| int | adsi_tx_put_message (adsi_tx_state_t *s, const uint8_t *msg, int len) | 
| Put a message into the input buffer of an ADSI transmit context. | |
| int | adsi_next_field (adsi_rx_state_t *s, const uint8_t *msg, int msg_len, int pos, uint8_t *field_type, uint8_t const **field_body, int *field_len) | 
| Get a field from an ADSI message. | |
| int | adsi_add_field (adsi_tx_state_t *s, uint8_t *msg, int len, uint8_t field_type, uint8_t const *field_body, int field_len) | 
| Insert the header or a field into an ADSI message. | |
| const char * | adsi_standard_to_str (int standard) | 
| Return a short name for an ADSI standard. | |
| #define CLIP_DTMF_C_ABSENCE 'B' | 
Caller number absent: private/restricted (00) or not available (10)
| #define CLIP_DTMF_C_CALLER_NUMBER 'A' | 
Caller number
| #define CLIP_DTMF_C_REDIRECT_NUMBER 'D' | 
Diverting number
| #define CLIP_DTMF_C_TERMINATED 'C' | 
Caller number is 'C' terminated DTMF.
| #define CLIP_DTMF_HASH_ABSENCE 'D' | 
Caller number absent: private (1), overseas (2) or not available (3)
| #define CLIP_DTMF_HASH_CALLER_NUMBER 'A' | 
Caller number
| #define CLIP_DTMF_HASH_TERMINATED '#' | 
Caller number is '#' terminated DTMF.
| #define CLIP_DTMF_HASH_UNSPECIFIED 0 | 
Caller ID field with no explicit field type
| #define JCLIP_MDMF_CALLERID 0x40 | 
Definitions for J-CLIP (Japan Calling Line Identity Presentation)
Multiple data message caller ID frame
| #define MCLASS_VISUAL_INDICATOR 0x0B | 
CLASS MDMF message waiting message IDs
Message waiting/not waiting
| typedef struct adsi_rx_state_s adsi_rx_state_t | 
ADSI receiver descriptor. This contains all the state information for an ADSI (caller ID, CLASS, CLIP, ACLIP, JCLIP) receive channel.
| typedef struct adsi_tx_state_s adsi_tx_state_t | 
ADSI transmitter descriptor. This contains all the state information for an ADSI (caller ID, CLASS, CLIP, ACLIP) transmit channel.
| anonymous enum | 
| anonymous enum | 
CLASS MDMF message IDs
| anonymous enum | 
Definitions for CLIP (Calling Line Identity Presentation) (from ETS 300 659-1)
| anonymous enum | 
CLIP message IDs (from ETS 300 659-1)
| anonymous enum | 
| anonymous enum | 
A-CLIP MDM message IDs
| anonymous enum | 
| int adsi_add_field | ( | adsi_tx_state_t * | s, | 
| uint8_t * | msg, | ||
| int | len, | ||
| uint8_t | field_type, | ||
| uint8_t const * | field_body, | ||
| int | field_len | ||
| ) | 
Insert the header or a field into an ADSI message.
| s | The ADSI transmit context. | 
| msg | The message buffer. | 
| len | The current length of the message. | 
| field_type | The type code for the new field. | 
| field_body | Pointer to the body of the new field. | 
| field_len | The length of the new field. | 
References CLIP_DTMF_HASH_UNSPECIFIED.
| int adsi_next_field | ( | adsi_rx_state_t * | s, | 
| const uint8_t * | msg, | ||
| int | msg_len, | ||
| int | pos, | ||
| uint8_t * | field_type, | ||
| uint8_t const ** | field_body, | ||
| int * | field_len | ||
| ) | 
Get a field from an ADSI message.
| s | The ADSI receive context. | 
| msg | The message buffer. | 
| msg_len | The length of the message. | 
| pos | Current position within the message. Set to -1 when starting a message. | 
| field_type | The type code for the field. | 
| field_body | Pointer to the body of the field. | 
| field_len | The length of the field, or -1 for no more fields, or -2 for message structure corrupt. | 
References CLIP_DTMF_HASH_UNSPECIFIED.
| int adsi_rx | ( | adsi_rx_state_t * | s, | 
| const int16_t | amp[], | ||
| int | len | ||
| ) | 
Receive a chunk of ADSI audio.
| s | The ADSI receive context. | 
| amp | The audio sample buffer. | 
| len | The number of samples in the buffer. | 
References dtmf_rx().
| int adsi_rx_free | ( | adsi_rx_state_t * | s | ) | 
Free the resources of an ADSI receive context.
| s | The ADSI receive context. | 
| logging_state_t * adsi_rx_get_logging_state | ( | adsi_rx_state_t * | s | ) | 
Get the logging context associated with an ADSI receive context.
Get the logging context associated with an ADSI receive context.
| s | The ADSI receive context. | 
| adsi_rx_state_t * adsi_rx_init | ( | adsi_rx_state_t * | s, | 
| int | standard, | ||
| put_msg_func_t | put_msg, | ||
| void * | user_data | ||
| ) | 
Initialise an ADSI receive context.
| s | The ADSI receive context. | 
| standard | The code for the ADSI standard to be used. | 
| put_msg | A callback routine called to deliver the received messages to the application. | 
| user_data | An opaque pointer for the callback routine. | 
References dtmf_rx_init(), and fsk_rx_init().
| int adsi_rx_release | ( | adsi_rx_state_t * | s | ) | 
Release an ADSI receive context.
| s | The ADSI receive context. | 
| const char * adsi_standard_to_str | ( | int | standard | ) | 
Return a short name for an ADSI standard.
| standard | The code for the standard. | 
| int adsi_tx | ( | adsi_tx_state_t * | s, | 
| int16_t | amp[], | ||
| int | max_len | ||
| ) | 
Generate a block of ADSI audio samples.
| s | The ADSI transmit context. | 
| amp | The audio sample buffer. | 
| max_len | The number of samples to be generated. | 
References dtmf_tx().
| int adsi_tx_free | ( | adsi_tx_state_t * | s | ) | 
Free the resources of an ADSI transmit context.
| s | The ADSI transmit context. | 
| adsi_tx_state_t * adsi_tx_init | ( | adsi_tx_state_t * | s, | 
| int | standard | ||
| ) | 
Initialise an ADSI transmit context.
| s | The ADSI transmit context. | 
| standard | The code for the ADSI standard to be used. | 
References adsi_tx_set_preamble(), and tone_gen_descriptor_init().
| int adsi_tx_put_message | ( | adsi_tx_state_t * | s, | 
| const uint8_t * | msg, | ||
| int | len | ||
| ) | 
Put a message into the input buffer of an ADSI transmit context.
| s | The ADSI transmit context. | 
| msg | The message. | 
| len | The length of the message. | 
References crc_itu16_calc(), and dtmf_tx_put().
| int adsi_tx_release | ( | adsi_tx_state_t * | s | ) | 
Release an ADSI transmit context.
| s | The ADSI transmit context. | 
| void adsi_tx_send_alert_tone | ( | adsi_tx_state_t * | s | ) | 
Request generation of an ADSI alert tone.
| s | The ADSI transmit context. | 
| void adsi_tx_set_preamble | ( | adsi_tx_state_t * | s, | 
| int | preamble_len, | ||
| int | preamble_ones_len, | ||
| int | postamble_ones_len, | ||
| int | stop_bits | ||
| ) | 
Adjust the preamble associated with an ADSI transmit context.
| s | The ADSI transmit context. | 
| preamble_len | The number of bits of preamble. | 
| preamble_ones_len | The number of bits of continuous one before a message. | 
| postamble_ones_len | The number of bits of continuous one after a message. | 
| stop_bits | The number of stop bits per character. | 
Referenced by adsi_tx_init().