Synopsis:
SMlisten(vox_chan, ts_handle)
Arguments:
port – The logical E1/T1 port number.
ts_handle – The logical timeslot handle returned from SMgetslot() (or using the formula shown in SMgetslot())
Description: This function causes the receive timeslot of the given voice channel to ‘listen’ to the transmit timeslot that has been nailed to the external H.100 or SCBUS. The ts_handle is a logical handle that references an external H.100 or SCBUS stream/timeslot as returned by CCgetslot() or SMgetslot() or which can be obtained by using the formula:
handle = stream * 4096 + timeslot
Where stream and timeslot are the stream and timeslot on the external H.100 or SCBUS. For the SCBUS the stream is hardcoded to 24.
For example the following code makes voice channel 1 listen to the network channel on port 0, channel 1 that any DTMF or audio from the caller will be heard by the voice channel for DTMF detection or recording.
x=SMlisten(1,CCgetslot(0,1);
Returns: This function returns 0 upon success or a negative error code.