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 */
	/* Only in Prosody version 2 (TiNG) */
	enum kSMTimeslotType type;				/* in */
	/* End of part only in Prosody version 2 (TiNG) */
} SM_SWITCH_CHANNEL_PARMS;

Description

Assigns (or de-assigns) a timeslot (overriding any automatically assigned timeslot) to channel.

Only on Prosody version 1: Applicable only to channels located on Prosody ISA card speech processing modules.
Only on Prosody version 2 (TiNG): The streams which can be used with this call depend on the type of Prosody carrier card being used. On the ISA Prosody card, the accessible streams are on the external bus (MVIP), while on other cards they are special internal streams which are only accessible to Prosody and the switch driver.

On all cards the same timeslot may be used as input to several channels.

To assign an SCbus timeslot for channel, set st to 24 (the stream assigned to the SCbus) and ts to an SCbus timeslot number.

Only on Prosody version 2 (TiNG): SCbus access is not implemented.

To assign an MVIP bus timeslot for channel, set st to a value between 0 and 7 for the DSi stream required and set ts to the required timeslot number.

To de-assign external bus MVIP or SCbus timeslot, set both st and ts to a value of -1.

Only on Prosody version 2 (TiNG): Note that the hardware can only support one type of companding on a stream. This means that A-law and mu-law cannot be mixed on the same stream (though data and non-data can be mixed) so, for example, on a P1 (PCI) card, it is not possible to use stream 48, timeslot 0 for A-law at the same time as using stream 48, timeslot 1 for mu-law, but it is possible to use A-law for timeslots on stream 48 while having mu-law timeslots on stream 49. Note that it is an error to try to specify a different type for the same timeslot on two channels simultaneously. i.e. if one channel is reading A-law from 48:7, then any other channel reading from 48:7 must not try to use it as mu-law or data.
Only on Prosody version 2 (TiNG): This function can be used with Prosody X cards in TDM only applications for backward compatibility. 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 (Only in Prosody version 2 (TiNG))
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.