Prosody generic: API: sm_config_module_switching

This function is deprecated.

Prototype Definition

int sm_config_module_switching(struct sm_config_module_sw_parms *configp)

Parameters

*configp
a structure of the following type:
typedef struct sm_config_module_sw_parms {
	tSMModuleId module;					/* in */
	tSM_INT auto_assign_out_ts;				/* in */
	tSM_INT auto_assign_in_ts;				/* in */
	tSM_INT out_st0;					/* in */
	tSM_INT out_st1;					/* in */
	tSM_INT out_base_ts;					/* in */
	enum kSMTimeslotType {
		kSMTimeslotTypeALaw,
		kSMTimeslotTypeMuLaw,
		kSMTimeslotTypeData,
	} in_type;						/* in */
	tSM_INT in_st0;						/* in */
	tSM_INT in_st1;						/* in */
	tSM_INT in_base_ts;					/* in */
	enum kSMTimeslotType out_type;				/* in */
} SM_CONFIG_MODULE_SW_PARMS;

Description

Overrides default or configured assignment scheme used by driver to associate channels with timeslots on card external bus. 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.

When a channel is allocated, it can have an associated external bus MVIP or SCbus timeslot automatically assigned to it. Alternatively, timeslot assignment may be left to the application which can call sm_switch_channel_output() or sm_switch_channel_input() following channel allocation to explicitly assign an external bus timeslot.

If output channel timeslots for module module are to be assigned by the application through calls to sm_switch_channel_output(), then auto_assign_out_ts must be set to zero.

If output channel timeslots for module module are to be automatically assigned, then auto_assign_out_ts must be set to 1 and the fields out_st0, out_st1 and out_base_ts must be set up to specify the external bus streams and timeslots to be assigned.

If SCbus external bus timeslots are to be assigned, out_st0 and out_st1 should both be set to 24 (the stream assigned to the SCbus) and out_base_ts should be set to the first SCbus timeslot to be assigned for this module.

If MVIP external bus timeslots are to be assigned, out_st0 and out_st1 should be set to DSo stream numbers (0..7) for the first 32 and second 32 timeslots assigned, and out_base_ts must be set to zero.

If input channel timeslots for module module are to be assigned by the application through calls to sm_switch_channel_input(), then auto_assign_in_ts must be set to zero.

If input channel timeslots for module module are to be automatically assigned, then auto_assign_in_ts must be set to 1 and the fields in_st0, in_st1 and in_base_ts must be set up to specify the external bus streams and timeslots to be assigned.

If SCbus external bus timeslots are to be assigned, in_st0 and in_st1 should both be set to 24 (the stream assigned to the SCbus) and in_base_ts should be set to the first SCbus timeslot to be assigned for this module.

If MVIP external bus timeslots are to be assigned, in_st0 and in_st1 should be set to DSi stream numbers (0..7) for the first 32 and second 32 timeslots assigned, and in_base_ts must be set to zero.

The use of automatic timeslot assignment is not recommended. It prevents the sharing of a timeslot between multiple channels (which is useful when debugging as it permits the recording of an input without interfering with normal processing of that input). Normally it is trivial to assign timeslots explicitly (for example, by deriving the timeslot number from some property of a call, such as the port and timeslot number of the call).

The use of automatic timeslot assignment is not supported on ProsodyS or ProsodyX.

Fields

module (Deprecated)
A value obtained from sm_open_module() which indicates the module to configure.
auto_assign_out_ts (Deprecated)
Controls whether output timeslots should be assigned automatically. The value 1 enables automatic assignment, 0 selects assignment by the application.
auto_assign_in_ts (Deprecated)
Controls whether input timeslots should be assigned automatically. The value 1 enables automatic assignment, 0 selects assignment by the application.
out_st0 (Deprecated)
The first stream from which output timeslots are to be automatically assigned.
out_st1 (Deprecated)
The second stream from which output timeslots are to be automatically assigned.
out_base_ts (Deprecated)
The lowest numbered timeslot to use for automatic assignment of output timeslots. This field is ignored.
in_type (Deprecated)
The data encoding used on timeslots automatically allocated within this stream.
One of these values:
kSMTimeslotTypeALaw
Signals encoded with A-law companding.
kSMTimeslotTypeMuLaw
Signals encoded with mu-law companding.
kSMTimeslotTypeData
Digital data - no companding used.
in_st0 (Deprecated)
The first stream from which input timeslots are to be automatically assigned.
in_st1 (Deprecated)
The second stream from which input timeslots are to be automatically assigned.
in_base_ts (Deprecated)
The lowest numbered timeslot to use for automatic assignment of input timeslots. This field is ignored.
out_type (Deprecated)
The data encoding used on timeslots automatically allocated within this stream.
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.