SMgetslot
Previous Topic  Next Topic 

Synopsis:

       handle=SMgetslot(vox_chan)


Arguments:

       vox_chan The voice channel


Description:    This function returns a logical handle to the external H.100 or SCBUS transmit timeslot for the specified vox_chan.       The timeslot handle references the transmit timeslot of the given vox_chan which has been nailed to a H.100 or SCBUS timeslot by the library at start-up.            This only applies to boards that have switching capabilities and not to the PROSODY_S type virtual boards which do not have any external switching capability.


The returned handle is actually obtained from the physical H.100 or SCBUS stream and timeslot from the following formula:


handle = stream * 4096 + timeslot


For the SCbus the stream is always 24 which is the internal fixed stream that is used by the ACULAB firmware when SCBUS is present.


For example, if a prosody board has two DSPs attached giving 300 channels of speech pricessing and is fitted with a  H.100 bus, then upon startup the CXACUDSP.DLL library will automatically nail the transmit timeslots from the voice channels to the H.100 bus starting at stream 8, timeslot 0 (or as defined by the PROSODY_TSOFFS environment variable) .        Since each H.100 stream can have 128 timeslots then three streams will be used by the 300 voice channels on this card.   


Voice channels 1 to 128 would be nailed to the timeslots of stream 8, voice channels 129 to 256 would be nailed to the timeslots of stream 9 and voice channels 257 to 300 would be nails to the first 64 timeslots of stream 10 on the H.100 bus.


From the formula shown above, the handles returned by the SMgetslot() function would range from 32768 though to 32895 for first 128 voice channels,  36864 through to 36991 for channels 129 to 256 and 40960 through to 41023 for the last 64 voice channels.



The external bus handle returned by SMgetslot() can be used in the SMlisten() function to allow the receive timeslot of one channel to listen to the transmit timeslot from another channel via the external H.100 or SCBUS.


For example, if there was an inbound call on E1 port 0, channel 1 then the voice channel number 1 could be connected to this network channel in a full duplex connect, via the external bus.


# Make a full duplex connection between the voice channel and the network channel

CClisten(0,1,SMgetslot(1));

SMlisten(1,CCgetslot(0,1);


Returns: This function returns the logical timeslot handle for the given vox_chan or a negative error code.