Prosody ADSI library: API: sm_play_sas_cas

Prototype Definition

int sm_play_sas_cas(struct sm_play_sas_cas_parms *parms, ADSI_MODULE mp)

Parameters

*parms
a structure of the following type:
typedef struct sm_play_sas_cas_parms {
	tSMChannelId channel;					/* in */
	enum kSASToneType {
		kSASToneTypeSingleBurst,
		kSASToneTypeDoubleBurst,
		kSASToneTypeTripleBurst,
	} sas_tone_type;						/* in */
} SM_PLAY_SAS_CAS_PARMS;
mp
A pointer to a structure initialised with adsi_init().

Description

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.

Fields

channel
The channel on which to generate the signal. This must have been allocated on the Prosody module that the mp parameter refers to.
sas_tone_type
The variant of SAS tone to generate. One of these values:
kSASToneTypeSingleBurst
Generate SAS tone with single burst of tone.
kSASToneTypeDoubleBurst
Generate SAS tone with two bursts of tone.
kSASToneTypeTripleBurst
Generate SAS tone with three bursts of tone.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody ADSI library API.