Thanks Martin.
Sample code from AgentViewer may help. We will try following code tomorrow-
private void handleCallCtlConnDisconnectedEvent_TransferCause(
CallControlConnectionEvent connEvent, CallManager callmanager) {
Call call = connEvent.getCall();
long callID = CallUtilities.getCallID(call);
String droppedDeviceID = callmanager.getDeviceID(call,
connEvent.getConnection().getAddress().getName());
Connection[] conns = call.getConnections();
// If there was only one connection in the call, the call has now
// ended
if (conns == null || conns.length < CallManager.MIN_CONN) {
callmanager.updateCall(callID, ConnectionState.Null,
null, null, null, droppedDeviceID);
return;
}
// Retrieve the old call that was transferred
long oldCallID = CallUtilities.getOldCallID(call);
String oldDroppedDeviceID = CallUtilities.getOldDeviceID(call);
/*
* Determine the device to which the call is transferred.
* If the call is answered before transfer is completed, it is the stored
* calledDevice. In the case of blind transfer it is the device which
* is alerting.
*/
String newDeviceID = null;
if (callmanager.hasCall(callID)) {
newDeviceID = callmanager.getCall(callID).getCalledDeviceID();
} else {
if (conns[0].getState() == Connection.ALERTING) {
newDeviceID = conns[0].getAddress().getName();
} else {
newDeviceID = conns[1].getAddress().getName();
}
}
// Inform the UI that the call is transferring. This shows the ID of
// the old call, the device transferring and the device being
// transferred to.
callmanager.updateCall(oldCallID, ConnectionState.Transfered,
CallState.INVALID, null, newDeviceID, oldDroppedDeviceID);
}
Regards,
Umesh
|