The following functions are provided by the Prosody ADSI library API:
API call | W | Description |
---|---|---|
adsi_init() | Prepare a Prosody module for use with ADSI | |
sm_play_sas_cas() | Generate the SAS and CAS parts of an ADSI outgoing signal | |
sm_play_vmwi_fsk() | Send a VMWI message over FSK modulation. | |
sm_play_cnd_fsk() | Send a CND message over FSK modulation. |
This document is also available as separate pages for each function.
int adsi_init(ADSI_MODULE mp, tSMModuleId module)
Prepares a Prosody module for use with ADSI.
0 if call completed successfully, otherwise a standard error such as:
int sm_play_sas_cas(struct sm_play_sas_cas_parms *parms, ADSI_MODULE mp)
typedef struct sm_play_sas_cas_parms { tSMChannelId channel; /* in */ enum kSASToneType { kSASToneTypeSingleBurst, kSASToneTypeDoubleBurst, kSASToneTypeTripleBurst, } sas_tone_type; /* in */ } SM_PLAY_SAS_CAS_PARMS;
This function generates the Subscriber Alerting Signal (SAS) and the CPE Alerting Signal (CAS). The exact sequence generated is:
kSASToneTypeSingleBurst | kSASToneTypeDoubleBurst | kSASToneTypeTripleBurst |
---|---|---|
440 Hz @ -16 dBm0 for 300 mS | - | 440 Hz @ -16 dBm0 for 100 mS |
- | silence for 100 mS | |
440 Hz @ -16 dBm0 for 100 mS | ||
silence for 100 mS | ||
440 Hz @ -16 dBm0 for 100 mS | ||
2130 Hz @ -15 dBm0 + 2750 Hz @ -15 dBm0 for 82 mS | ||
silence for 160 mS |
Since this function uses sm_play_cptone() to generate the signal, the end of the signal is reported by sm_play_cptone_status() which can be monitored by waiting on the write event.
This function requires the firmware module tonegen to have been downloaded.
0 if call completed successfully, otherwise a standard error such as:
int sm_play_vmwi_fsk(struct sm_play_vmwi_fsk *parms)
typedef struct sm_play_vmwi_fsk { tSMChannelId channel; /* in */ tSM_INT do_on_hook; /* in */ tSM_INT is_sdmf_message; /* in */ tSM_INT is_indicator_on_message; /* in */ } SM_PLAY_VMWI_FSK;
This function generates a Visual Message Waiting Indicator (VMWI) message. The message is sent in an FSK transmission at 1200 bits per second, using 1200 Hz for mark, 2200 Hz for space, and a power level of -13dBm0.
This function is intended to be used immediately after sm_play_sas_cas() has sent the SAS and CAS portion of the message.
Since this function uses the standard Prosody data communications API to generate the signal, the end of the signal is reported by smdc_line_status() which can be monitored by waiting on the write event.
This function requires the firmware modules asytx, fsktx, outchan, and prefsuf to have been downloaded.
0 if call completed successfully, otherwise a standard error such as:
int sm_play_cnd_fsk(struct sm_play_cnd_fsk *parms)
typedef struct sm_play_cnd_fsk { tSMChannelId channel; /* in */ tSM_INT do_on_hook; /* in */ tSM_INT is_sdmf_message; /* in */ enum kCNDType { kCNDTypeAnonymous, kCNDTypeOutOfArea, kCNDTypeCallingDN, } cnd_type; /* in */ tSM_INT month; /* in */ tSM_INT day; /* in */ tSM_INT hour; /* in */ tSM_INT minute; /* in */ char digit_string[kCNDCallingDNMaxDigits_plus1]; /* in */ char name_string[kCNDCallingNameMaxLen_plus1]; /* in */ } SM_PLAY_CND_FSK;
This function generates a Calling Number Display (CND) message. The message is sent in an FSK transmission at 1200 bits per second, using 1200 Hz for mark, 2200 Hz for space, and a power level of -13dBm0.
This function is intended to be used immediately after sm_play_sas_cas() has sent the SAS and CAS portion of the message.
Since this function uses the standard Prosody data communications API to generate the signal, the end of the signal is reported by smdc_line_status() which can be monitored by waiting on the write event.
This function requires the firmware modules asytx, fsktx, outchan, and prefsuf to have been downloaded.
0 if call completed successfully, otherwise a standard error such as:
These functions constitute the Prosody ADSI library API.