Prosody generic: API: sm_switch_channel_output

Prototype Definition

int sm_switch_channel_output(struct sm_switch_channel_parms *switchp)

Parameters

*switchp
a structure of the following type:
typedef struct sm_switch_channel_parms {
	tSMChannelId channel;					/* in */
	tSM_INT st;						/* in */
	tSM_INT ts;						/* in */
	enum kSMTimeslotType type;				/* in */
} SM_SWITCH_CHANNEL_PARMS;

Description

Assigns (or de-assigns) a timeslot to channel. No timeslot can be used as output by more than one channel at a time.

This function can be used with Prosody X cards in TDM only applications for backward compatibility. For new applications it is recommended that sm_tdmtx_create() and sm_tdmtx_datafeed_connect() be used. To use this function with a Prosody X card the module datafeed must be downloaded.

Fields

channel
The channel from which the output is to be switched.
st
The destination stream.
ts
The destination timeslot.
type
The data encoding used on this timeslot. One of these values:
kSMTimeslotTypeALaw
Signals encoded with A-law companding.
kSMTimeslotTypeMuLaw
Signals encoded with mu-law companding.
kSMTimeslotTypeData
Digital data - no companding used.

Returns

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


This function is part of the Prosody generic API.