Hello,
I have a new problem with the DMCC - Java API 7.0.0.0.0.288.
The following Senario:
A calls B
B parks A
Our controller sets a monitor for this parked call.
Features.getMonitoringServices().AddCallControlListener(callId, this);
CallId = ConnectionID for the parked call from A
Then
C calls B
B parks C
Our controller sets a monitor for this parked call.
Features.getMonitoringServices().AddCallControlListener(callId, this);
CallId = ConnectionID for the parked call from C
C finish the call while parked
CallCleared is called.
The controller removes the monitor for this call.
Features.getMonitoringServices().RemoveCallControlListener(event.getClearedCall(), this);
A finish the call while parked
CallCleared is not called
In debug I see that the class com.avaya.mvap.svcproxy.MonitoringServicesProxy handles this call.
In the called function, the ConnectionId is required but only checked to null and then not considered further.
It only calls the removeEventListener function.
protected void removeEventListener(EventListener listener, Map<EventListener, List><String>> listenerMap) throws CstaException {
if (listener == null) {
throw new IllegalArgumentException("The listener cannot be null");
} else {
List<String> list = (List)listenerMap.get(listener);
if (list != null && list.size() != 0) {
if (list.size() == 1) {
listenerMap.remove(listener);
}
String monitor = (String)list.remove(0); //This does not remove the correct element.
EventListener listener2 = (EventListener)this.monitorMap.remove(monitor);
if (!listener.equals(listener2)) {
log.warning("Expected " + listener + " found " + listener2);
}
MonitorStop request = MonitorFilters.getMonitorStop(monitor);
this.marshallRequest(request);
if (log.isLoggable(Level.FINE)) {
log.fine("Removed " + listener + ", monitor=" + monitor);
}
} else {
if (log.isLoggable(Level.FINE)) {
log.fine("Can't find listener " + listener + " to remove");
}
}
}
}
There is only one instance of the controller that monitors the parked calls. Therefore a list with several monitors is found in the listenerMap.
List<String> list = (List)listenerMap.get(listener);
Listener here is our controller instance
However, it is not checked which call should not be monitored anymore. It allways removes the first entry of the given monitor instance, not the monitor for the requested call.
String monitor = (String)list.remove(0);
The removed element is here the monitor for the call from A instead of C.
If A finish the call before C it works.
Is this a bug in the API or do I use it wrong?
Greetings
Stefan