ms_monconf( )
Cautions | Errors | Example | See Also
Name: int ms_monconf (devh, confID, lts) Inputs:
Returns: Includes: Category: Mode: Platform: Description
The ms_monconf( ) function adds a monitor to a conference. Monitoring a conference guarantees that the conferenced signal will be placed on the TDM bus. This is slightly different from when a receive-only party is added to a conference. In case of a receive-only party, the conferenced signal may or may not be placed on the TDM bus, depending on the chan_sel of the party. Since the monitored signal is on the TDM bus, several parties can listen to the monitored signal simultaneously. It is the application's responsibility to listen to the TDM bus time slot on which the monitored signal is transmitted.
A monitor counts as one of the parties in the conference. If the maximum number of parties allowed is used, it is not possible to monitor the conference. When a conference is deleted, the conference monitor is also deleted.
devh the MSI board device handle confID the conference identifier lts pointer to the listen TDM bus time slot; the monitored signal will be present on this time slot
- Notes:
- 1. This function can only be issued once per conference. If you attempt to add another monitor using ms_monconf( ), you will receive the E_MSMONEXT error message.
2. Calling this function uses one resource.Cautions
- The device handle specified is invalid
- The conference is full
- The board is out of DSP resources
- The conference ID is invalid
Errors
If this function returns -1 to indicate failure, obtain the reason for the error by calling the SRL standard attribute function ATDV_LASTERR( ) or ATDV_ERRMSGP( ) to retrieve either the error code or a pointer to the error description, respectively.
Refer to the error type tables found in Chapter 5, "Error Codes". Error defines can be found in dtilib.h or msilib.h.
Example
#include <windows.h> /* For Windows applications only */ #include <errno.h> #include "srllib.h" #include "dtilib.h" #include "msilib.h" #define NUM_PARTIES 2 int dev1; /* Board dev descriptor variables */ int tsdev1; /* DTI time slot device handle */ MS_CDT cdt[NUM_PARTIES]; /* Conf. desc. table */ int confID; /* Conf. ID */ long lts; /* listen time slot */ SC_TSINFO tsinfo; /* Time slot information structure */ int ts1; /* Open board 1 device */ if ((dev1 = ms_open("msiB1",0)) == -1) { printf( "Cannot open MSI B1: errno=%d", errno); exit(1); } /* Assume that there is a DTI in the system. * Assume the device handle for a time slot on the DTI * is tsdev1 and time slot it is assigned to is ts1 */ /* Set up CDT structure */ cdt[0].chan_num = station ; /* Valid MSI Station */ cdt[0].chan_sel = MSPN_STATION; cdt[0].chan_attr =MSPA_NULL; cdt[1].chan_num = ts1; /* ts1 is a valid DTI time slot */ cdt[1].chan_sel = MSPN_TS; cdt[1].chan_attr =MSPA_TARIFF; /* Establish conference */ if (ms_estconf(dev1, cdt, NUM_PARTIES, MSCA_ND, &confID) == -1) { printf("Error Message = %s",ATDV_ERRMSGP(dev1)); exit(1); } /* * Continue Processing */ /* Now monitor the conference */ if (ms_monconf(dev1, confID,<s) == -1){ printf("Error Message = %s",ATDV_ERRMSGP(dev1)); exit(1); } /* Assume that a DTI device tsdev1 is available */ tsinfo.sc_numts = 1; tsinfo.sc_tsarray = <s; if (dt_listen(tsdev1,&tsinfo) == -1){ printf("Error Message = %s",ATDV_ERRMSGP(tsdev1)); exit(1); } /* * Continue Processing */See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation