Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

Timeslot management

This section describes the IRAPI functions that control the timeslots on the H.110 bus on the system.

The H.110 bus is used in the system to transfer speech data between E1, T1, circuit cards. There are 4096 communication paths, called timeslots, on the H.110 bus. To transfer speech data between cards, an IRAPI application must reserve a H.110 timeslot. There are two timeslots pre-allocated (or reserved) for each channel on the system. One of these reserved timeslots is used by the channel to output the speech data it receives from the network, while the other is reserved for inputting any speech data sent by other cards across the network. The channel can have up to 7 input timeslots, including the pre-allocated timeslot. Six timeslot spaces remain to perform activities such as playing background speech, half-bridging, or monitoring.

The irHBridge(3IRAPI) function implements half-bridging by adding another channel's input timeslot to the controlling channel's output. In other words, if channel A half-bridges to channel B, the customer on channel A hears what is being said by the customer on channel B. The customer on channel B is unaware that channel A has half-bridged to channel B. To perform a full-bridge, channel B then must use irHBridge to half-bridge to channel A. Then, the customer on channel A hears what the customer on channel B is saying and vice-versa. The application must coordinate the two half-bridges to perform a full-bridge.

A channel can listen to another channel's input and output by using the irMonitor(3IRAPI) function. The transmission of DTMF digits across the H.110 timeslots can be enabled or disabled by setting the IRP_DTMF_MUTING parameter.

Both irHBridge(3IRAPI) and irMonitor(3IRAPI) take channels and cid's as arguments and determine what timeslots are involved based on what channels are involved.

The IRAPI also provides the following functions that allow applications to work on a timeslot basis:

In the following example, the application allocates a timeslot, places the timeslot in its output, queues speech files TS_PLAY_FILE1 and TS_PLAY_FILE2, and then calls irTSEnd to play the queued speech on the allocated timeslot. The IRE_TS_DONE event is used to indicate the end of a timeslot activity. The event_text element of the event structure points to another event structure containing an IRE_PLAY_DONE event.

void start_ts_play(channel_id cid)
{
int ts; /* Time slot */

if ( (ts = irTSAlloc(cid)) == IRR_FAIL
|| irTSControl(cid, ts, 0, IRD_ADD) == IRR_FAIL
|| irFPlay(cid, 0, TS_PLAY_FILE1) == IRR_FAIL
|| irFPlay(cid, 0, TS_PLAY_FILE2) == IRR_FAIL
|| irTSEnd(cid, 0, ts) == IRR_FAIL ) {
irDeinit(cid);
return;
}
}

� 2002 Avaya Inc. All Rights Reserved.