594 Chapter 22 CTI Developer Toolkit
Add call detail (using a third-party IVR)
The following C# code fragment shows a condensed version of using the AddCallDetail method to toolkit
users can invoke to add custom key/value pairs into call information.
In summary, this code fragment does the following:
Device_CallRecieved is an event handler that is invoked whenever a monitored IVR extension/port
recieves a call. This is needed to aquire the MiTAI Call ID which is used to link these extra infromation
records (--w records in ACD data files) to other call records
• When this event handler is invoked, it makes three sequential calls to the AddCallDetail method,
adding call values for the following keys: PFANI, PFCALLERNAME, and PFDNIS
• The keys used above are the ones that the default screen pop display recognizes, but developers can
easily make up their own key names as well, provided they have toolkit code on the client side to pull
the custom information from the CallInfoRecievedEvent notifications
public void Device_CallReceived(object sender, CallReceivedEventArgs e)
{
Device device = sender as Device;
DeviceManager.Instance.AddCallDetail(
e.CallingDevice.CallReferenceID, device.PBXIPAddress, device.DeviceID,
"PFANI", "6135990045");
DeviceManager.Instance.AddCallDetail(
e.CallingDevice.CallReferenceID, device.PBXIPAddress, device.DeviceID,
"PFCALLERNAME", "John Smith");
DeviceManager.Instance.AddCallDetail(
e.CallingDevice.CallReferenceID, device.PBXIPAddress, device.DeviceID,
"PFDNIS", "8001");
}