Prosody ADSI library: API: sm_play_cnd_fsk

Prototype Definition

int sm_play_cnd_fsk(struct sm_play_cnd_fsk *parms)

Parameters

*parms
a structure of the following type:
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;

Description

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.

Fields

channel
The channel on which to generate the signal.
do_on_hook
Selects on-hook (non-zero) or off-hook (zero) transmission format. The on-hook format starts with a channel seizure signal (300 bits of 0101...01) and 180 mark bits (11...1), whereas the off-hook format starts with only 80 mark bits.
is_sdmf_message
Selects Single Data Message Format - SDMF - (non-zero) or Multiple Data Message Format - MDMF - (zero).
cnd_type
Controls the calling number facility in the message. One of these values:
kCNDTypeAnonymous
Specifies that the calling number is to be omitted and a code included specifying that the calling number is anyonymous.
kCNDTypeOutOfArea
Specifies that the calling number is to be omitted and a code included specifying that the calling number is unavailable because it is out-of-area.
kCNDTypeCallingDN
Specifies that the calling number is to be included. The number is taken from the digit_string field.
month
The month (1..12) to include in the generated message.
day
The day (1..31) to include in the generated message.
hour
The hour (0..23) to include in the generated message.
minute
The minute (0..59) to include in the generated message.
digit_string
Specifies the calling number. This field is ignored unless the cnd_type field contains kCNDTypeCallingDN.
name_string
Specifies the name associated with the calling number. This is included in the generated message only if it is not a zero length string, the format is MDMF, and the cnd_type field contains kCNDTypeCallingDN.

Returns

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


This function is part of the Prosody ADSI library API.