NAME irServiceDataSuspend, irCallDataSuspend, irCallDataResume, irSetServiceEventBuf, irGetServiceEventBuf - manipulate call and service data SYNOPSIS #include <irapi.h> int irCallDataSuspend (channel_id cid); int irServiceDataSuspend (channel_id cid); int irCallDataResume (channel_id cid); int irSetServiceEventBuf (channel_id cid, int event_number, void *src, size_t size); int irGetServiceEventBuf (channel_id cid, int event_number, void *dest, size_t size); DESCRIPTION These functions manage the IRAPI call data record that is stored for the cid owned by the application. Call and ser- vice data are normally initialized and posted (written to the Call Data Handler (CDH)) for the application automati- cally by the IRAPI at appropriate times. The following table shows when per channel call data is ini- tialized and written for the CALL and SERVICE data. Note that EVENTS data is initialized and written in synchrony with SERVICE. Data Initialized Written ______________________________________________________________ CALL IRE_CHAN_GRANT, irDeinit() irExec() by Default Owner, irCallDataResume() SERVICE irInit() returning IRR_OK, irDeinit(), irReturn(), IRE_CHAN_GRANT, irExec() irCallDataResume()
1. CALL Data: This part of the record consists of call specific data such as the channel number on which the call was handled and the start time and end time of the call. When CALL Data are initialized, the channel number is set and the start time is set to the current system time. The end time is set when the CALL Data are written. 2. SERVICE Data: Since many different applications ("ser- vices") may run during a call, there may be more than one SERVICE Data record per CALL Data record. SERVICE Data consist of service specific information such as the service name, the start time and end time of the ser- vice, and the service EVENTS data (described below). When SERVICE Data are initialized, the service name is set from the value of IRP_SERVICE_NAME parameter, the start time is set to the current system time, and the service EVENTS data are set to null. The end time is set when the SERVICE Data are written. 3. EVENTS Data: The service EVENTS data are a subset of the SERVICE data described above. EVENTS data are stored in a IRD_MAX_CDSEV word (integer) array totalling sizeof(int) * IRD_MAX_CDSEV bytes in length. This array may contain event data in the form of integers or strings. Each data item must begin on a word (4-byte integer) boundry. Each item stored in the EVENTS data buffer is assigned an <event_number> between 0 and IRD_MAX_CDSEV-1 (corresponding to its index in the buffer) and an <event_name> (an alphanumeric label for the event to be used in Call Data Reports). The struc- ture of the IRD_MAX_CDSEV word sized block (event IDs, names, and data types) is described to the call data subsystem through the <service_name>.D file. <service_name> is taken from the IRP_SERVICE_NAME param- eter. This file must exist in the /vs/trans directory for both writing and reading the EVENTS data. If it does not exist, the EVENTS data will be dropped. event (each consecutive <event_number> represents 4 bytes of space). The function irServiceDataSuspend will inhibit writing any SERVICE and EVENTS data for the current application to the CDH when irDeinit(3IRAPI), irExec(3IRAPI) or irReturn(3IRAPI) is called. The function irCallDataResume will reinitialize CALL and SERVICE data (setting the start time for each to the current time) for the current application. Any EVENTS data set by the application with irSetServiceEventBuf() before calling this function remains unchanged. The function irSetServiceEventBuf sets call data service event number event_number to src, where size is the size of the data pointed to by src in bytes. The function irGetServiceEventBuf copys into the area pointed to by dest the data for event_number , where size is the size of the data to be copied in bytes. A valid event_number is simply an integer ranging from 0 to IRD_MAX_CDSEV-1 that may have arbitrary meanings for end-user applications. (See the dis- cussion of the <service_name>.D file above.) RETURN VALUE IRR_OK is returned if the request is successful. IRR_FAIL is returned if an error occurs. This is version 10/24/02 of this man page.