Go to the source code of this file.
Classes | |
| struct | adsi_tx_state_t |
| struct | adsi_rx_state_t |
Defines | |
| #define | _SPANDSP_ADSI_H_ |
| #define | CLASS_SDMF_CALLERID 0x04 |
| #define | CLASS_MDMF_CALLERID 0x80 |
| #define | CLASS_SDMF_MSG_WAITING 0x06 |
| #define | CLASS_MDMF_MSG_WAITING 0x82 |
| #define | MCLASS_DATETIME 0x01 |
| #define | MCLASS_CALLER_NUMBER 0x02 |
| #define | MCLASS_DIALED_NUMBER 0x03 |
| #define | MCLASS_ABSENCE1 0x04 |
| #define | MCLASS_REDIRECT 0x05 |
| #define | MCLASS_QUALIFIER 0x06 |
| #define | MCLASS_CALLER_NAME 0x07 |
| #define | MCLASS_ABSENCE2 0x08 |
| #define | MCLASS_VISUAL_INDICATOR 0x0B |
| #define | CLIP_MDMF_CALLERID 0x80 |
| #define | CLIP_MDMF_MSG_WAITING 0x82 |
| #define | CLIP_MDMF_CHARGE_INFO 0x86 |
| #define | CLIP_MDMF_SMS 0x89 |
| #define | CLIP_DATETIME 0x01 |
| #define | CLIP_CALLER_NUMBER 0x02 |
| #define | CLIP_DIALED_NUMBER 0x03 |
| #define | CLIP_ABSENCE1 0x04 |
| #define | CLIP_CALLER_NAME 0x07 |
| #define | CLIP_ABSENCE2 0x08 |
| #define | CLIP_VISUAL_INDICATOR 0x0B |
| #define | CLIP_MESSAGE_ID 0x0D |
| #define | CLIP_CALLTYPE 0x11 |
| #define | CLIP_NUM_MSG 0x13 |
| #define | CLIP_REDIR_NUMBER 0x03 |
| #define | CLIP_CHARGE 0x20 |
| #define | CLIP_DURATION 0x23 |
| #define | CLIP_ADD_CHARGE 0x21 |
| #define | CLIP_DISPLAY_INFO 0x50 |
| #define | CLIP_SERVICE_INFO 0x55 |
| #define | ACLIP_SDMF_CALLERID 0x04 |
| #define | ACLIP_MDMF_CALLERID 0x80 |
| #define | ACLIP_DATETIME 0x01 |
| #define | ACLIP_CALLER_NUMBER 0x02 |
| #define | ACLIP_DIALED_NUMBER 0x03 |
| #define | ACLIP_NUMBER_ABSENCE 0x04 |
| #define | ACLIP_REDIRECT 0x05 |
| #define | ACLIP_QUALIFIER 0x06 |
| #define | ACLIP_CALLER_NAME 0x07 |
| #define | ACLIP_NAME_ABSENCE 0x08 |
| #define | JCLIP_MDMF_CALLERID 0x40 |
| #define | JCLIP_CALLER_NUMBER 0x02 |
| #define | JCLIP_CALLER_NUM_DES 0x21 |
| #define | JCLIP_DIALED_NUMBER 0x09 |
| #define | JCLIP_DIALED_NUM_DES 0x22 |
| #define | JCLIP_ABSENCE 0x04 |
| #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' |
Enumerations | |
| enum | { ADSI_STANDARD_NONE = 0, ADSI_STANDARD_CLASS = 1, ADSI_STANDARD_CLIP = 2, ADSI_STANDARD_ACLIP = 3, ADSI_STANDARD_JCLIP = 4, ADSI_STANDARD_CLIP_DTMF = 5, ADSI_STANDARD_TDD = 6 } |
Functions | |
| void | adsi_rx_init (adsi_rx_state_t *s, int standard, put_msg_func_t put_msg, void *user_data) |
| Initialise an ADSI receive context. | |
| void | adsi_rx (adsi_rx_state_t *s, const int16_t *amp, int len) |
| Receive a chunk of ADSI audio. | |
| void | adsi_tx_init (adsi_tx_state_t *s, int standard) |
| Initialise 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 ACLIP_CALLER_NAME 0x07 |
Caller's name
| #define ACLIP_CALLER_NUMBER 0x02 |
Caller number
| #define ACLIP_DATETIME 0x01 |
Date and time (MMDDHHMM)
| #define ACLIP_DIALED_NUMBER 0x03 |
Dialed number
| #define ACLIP_MDMF_CALLERID 0x80 |
Multiple data message caller ID frame
| #define ACLIP_NAME_ABSENCE 0x08 |
Caller's name absent: 'O' or 'P'
| #define ACLIP_NUMBER_ABSENCE 0x04 |
Caller number absent: 'O' or 'P'
| #define ACLIP_QUALIFIER 0x06 |
Long distance call: 'L'
| #define ACLIP_REDIRECT 0x05 |
Call forward: universal, on busy, or on unanswered
| #define ACLIP_SDMF_CALLERID 0x04 |
Single data message caller ID frame
| #define CLASS_MDMF_CALLERID 0x80 |
Multiple data message caller ID
| #define CLASS_MDMF_MSG_WAITING 0x82 |
Multiple data message message waiting
| #define CLASS_SDMF_CALLERID 0x04 |
Single data message caller ID
| #define CLASS_SDMF_MSG_WAITING 0x06 |
Single data message message waiting
| #define CLIP_ABSENCE1 0x04 |
Caller number absent: 'O' or 'P'
| #define CLIP_ABSENCE2 0x08 |
Caller's name absent: 'O' or 'P'
| #define CLIP_ADD_CHARGE 0x21 |
Additional charge
| #define CLIP_CALLER_NAME 0x07 |
Caller's name
| #define CLIP_CALLER_NUMBER 0x02 |
Caller number
| #define CLIP_CALLTYPE 0x11 |
Voice call, ring-back-when-free call, or msg waiting call
| #define CLIP_CHARGE 0x20 |
Charge
| #define CLIP_DATETIME 0x01 |
Date and time (MMDDHHMM)
| #define CLIP_DIALED_NUMBER 0x03 |
Dialed number
| #define CLIP_DISPLAY_INFO 0x50 |
Display information
| #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_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 '#' |
Definitions for CLIP-DTMF and its variants
| #define CLIP_DTMF_HASH_UNSPECIFIED 0 |
Caller ID field with no explicit field type
| #define CLIP_DURATION 0x23 |
Duration of the call
| #define CLIP_MDMF_CALLERID 0x80 |
Multiple data message caller ID
| #define CLIP_MDMF_CHARGE_INFO 0x86 |
Multiple data message charge information
| #define CLIP_MDMF_MSG_WAITING 0x82 |
Multiple data message message waiting
| #define CLIP_MDMF_SMS 0x89 |
Multiple data message SMS
| #define CLIP_MESSAGE_ID 0x0D |
Message ID
| #define CLIP_NUM_MSG 0x13 |
Number of messages
| #define CLIP_REDIR_NUMBER 0x03 |
Redirecting number
| #define CLIP_SERVICE_INFO 0x55 |
Service information
| #define CLIP_VISUAL_INDICATOR 0x0B |
Visual indicator
| #define JCLIP_ABSENCE 0x04 |
Caller number absent: 'C', 'O', 'P' or 'S'
| #define JCLIP_CALLER_NUM_DES 0x21 |
Caller number data extension signal
| #define JCLIP_CALLER_NUMBER 0x02 |
Caller number
| #define JCLIP_DIALED_NUM_DES 0x22 |
Dialed number data extension signal
| #define JCLIP_DIALED_NUMBER 0x09 |
Dialed number
| #define JCLIP_MDMF_CALLERID 0x40 |
Multiple data message caller ID frame
| #define MCLASS_ABSENCE1 0x04 |
Caller number absent: 'O' or 'P'
| #define MCLASS_ABSENCE2 0x08 |
Caller's name absent: 'O' or 'P'
| #define MCLASS_CALLER_NAME 0x07 |
Caller's name
| #define MCLASS_CALLER_NUMBER 0x02 |
Caller number
| #define MCLASS_DATETIME 0x01 |
Date and time (MMDDHHMM)
| #define MCLASS_DIALED_NUMBER 0x03 |
Dialed number
| #define MCLASS_QUALIFIER 0x06 |
Long distance: 'L'
| #define MCLASS_REDIRECT 0x05 |
Call forward: universal ('0'), on busy ('1'), or on unanswered ('2')
| #define MCLASS_VISUAL_INDICATOR 0x0B |
Message waiting/not waiting
| 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. |
| 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. |
| void 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. |
| void 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. |
| 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. |
| void 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. |
| 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. |
| 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. |
1.5.2