Hello,
we are running a breeze cluster (cluster profile "General Purpose") containing two breeze servers (version 3.6.0.2.360203).
We build a callable snapin (sdk version: 3.6.0.1.360106) that receives a call and starts a media playback.
After that the call processing is finished, the calling participant is listening to the media playback.
public void handleInterceptedCall(Call call) {
try {
parkedCalls.put(call.getUCID(), call);
announcementService.playIntro(call, new IntroListener(call, announcementService));
restService.addCallToPool(call); // send ucid to external webapp
logger.info(format("UCID %s - Finished intercept call", call.getUCID()));
} catch (Exception exception) {
logger.error(format("UCID %s - Error occurred while intercepting call", call.getUCID()), exception);
call.drop();
}
}
The snapin provides a rest endpoint, that is used to forward the call to an endpoint.
Via the endpoint the ucid and the target number is provided. With the ucid we want to retrieve the call from Breeze.
public Call getCall(String ucid) {
return com.avaya.collaboration.call.CallFactory.getCall(ucid);
}
// after the call is requested, media playback should be stopped and the call is forwared to the targetNumber
pbulic void executeTransfer(com.avaya.collaboration.call.Call call, String targetNumber) {
logger.info(format("UCID %s - Forwarding call to target %s", call.getUCID(), targetNumber));
announcementService.stopPlayback(call);
parkedCalls.remove(call.getUCID());
com.avaya.collaboration.call.Participant participant = createParticipant(targetNumber, call);
call.addParticipant(participant);
}
If both server are available, the snapin works as planed.
2020-02-27 15:22:52,481 [SipContainerPool : 0] CallParkSnapIn INFO - CallParkSnapIn-1.0 - UCID 00001011531582813372 - Call from 3017 to 3022 intercepted with isCalledPhase false
2020-02-27 15:22:52,482 [SipContainerPool : 0] CallParkSnapIn INFO - CallParkSnapIn-1.0 - Playing d22e72aa-9118-4165-ae03-b2ecd9600a49 announcement for call with ucid 00001011531582813372
2020-02-27 15:22:52,516 [SipContainerPool : 0] CallParkSnapIn INFO - CallParkSnapIn-1.0 - UCID 00001011531582813372 - Added call to call pool in backend
2020-02-27 15:22:52,516 [SipContainerPool : 0] CallParkSnapIn INFO - CallParkSnapIn-1.0 - UCID 00001011531582813372 - Finished intercept call
2020-02-27 15:22:58,049 [WebContainer : 0] CallParkSnapIn INFO - CallParkSnapIn-1.0 - UCID 00001011531582813372 - Forwarding call to target 3018
2020-02-27 15:22:58,050 [WebContainer : 0] CallParkSnapIn INFO - CallParkSnapIn-1.0 - UCID 00001011531582813372 - Stopped playback for media with UUID d22e72aa-9118-4165-ae03-b2ecd9600a49 to participant 3017
2020-02-27 15:22:58,100 [WorkManager.MediaServerThreadPool : 8] CallParkSnapIn INFO - CallParkSnapIn-1.0 - UCID 00001011531582813372: Play operation <d22e72aa-9118-4165-ae03-b2ecd9600a49> completed with cause 'STOPPED'
2020-02-27 15:23:10,223 [SipContainerPool : 3] CallParkSnapIn INFO - CallParkSnapIn-1.0 - UCID 00001011531582813372 - Call is terminated with cause: Call cleared normally
But if one of the server is removed from the network (this way we want to test the cluster setup), the snapin fails to retrieve the call:
2020-02-27 15:39:06,212 [SipContainerPool : 1] CallParkSnapIn INFO - CallParkSnapIn-1.0 - UCID 00001013181582814345 - Call from 3016 to 3020 intercepted with isCalledPhase false
2020-02-27 15:39:06,213 [SipContainerPool : 1] CallParkSnapIn INFO - CallParkSnapIn-1.0 - Playing d8eb7045-8bbe-4bf8-a471-67f8e5c63e59 announcement for call with ucid 00001013181582814345
2020-02-27 15:39:06,335 [SipContainerPool : 1] CallParkSnapIn INFO - CallParkSnapIn-1.0 - UCID 00001013181582814345 - Added call to call pool in backend
2020-02-27 15:39:06,335 [SipContainerPool : 1] CallParkSnapIn INFO - CallParkSnapIn-1.0 - UCID 00001013181582814345 - Finished intercept call
2020-02-27 15:39:12,250 [WebContainer : 2] CallParkSnapIn ERROR - CallParkSnapIn-1.0 - Exception occurred during request ServletWebRequest: uri=/CallParkSnapIn-1.0/call/00001013181582814345/transfer;client=127.0.0.1
java.lang.IllegalStateException: No call associated with id=00001013181582814345
at com.avaya.collaboration.call.async.AsyncCallFactoryImpl.getCall(AsyncCallFactoryImpl.java:194)
at com.avaya.collaboration.call.async.AsyncCallFactoryImpl.getCall(AsyncCallFactoryImpl.java:178)
at com.avaya.collaboration.call.CallFactory.getCall(CallFactory.java:125)
at custom.wrapper.BreezeFactoryWrapper.getCall(BreezeFactoryWrapper.java:43)
at custom.softphone.call.CallService.retrieveCall(CallService.java:79)
at custom.softphone.call.CallService.transferCall(CallService.java:68)
at custom.softphone.call.CallController.forward(CallController.java:27)
at sun.reflect.GeneratedMethodAccessor458.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:111)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:806)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1232)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:781)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:480)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3951)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1014)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
2020-02-27 15:39:16,325 [SipContainerPool : 0] CallParkSnapIn INFO - CallParkSnapIn-1.0 - UCID 00001013181582814345 - Removed call from backend call pool
Any idea what could cause this behaviour?
Kind regards,
Domenic