Prosody generic: API: sm_switch_channel_input

Prototype Definition

int sm_switch_channel_input(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. The same timeslot may be used as input to several channels.

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

Fields

channel
The channel to which the input is to be switched.
st
The source stream.
ts
The source 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.