The application I'm developing needs to receive events from a SAP Contact Center for interactions happening on phones. Events such as IciEvent_phoneCallChanged, for example.
I am already able to receive user events by sending a subscription request. I am sending a subscription request for the Container interface and it seems to be working. In Wireshark I can see the response coming back from the Contact Centre, but when I make test calls no events are received.
The Container subscription is as such
containerSubscriber = new ContainerSubscriber("urn:IciContainerInterface", "IciContainerService", "http://<client_address>/oii/icicontainerservice.asmx?wsdl");
IciContainerServiceSoap port = containerSubscriber.getPort();
com.dvsoft.sap.containerici.client.SubscribeResponseResponse response = port.subscribe(appURL, appIdContainer, "1", container);
public class ContainerSubscriber {
private QName SERVICE_NAME;
private String wsdlurl;
public ContainerSubscriber(String namespaceURI, String localPart, String wsdlurl) {
this.wsdlurl = wsdlurl;
SERVICE_NAME = new QName(namespaceURI, localPart);
}
public IciContainerServiceSoap getPort() {
IciContainerServiceSoap port = null;
try {
URL wsdlURL;
wsdlURL = new URL(wsdlurl);
IciContainerService service = new IciContainerService(wsdlURL, SERVICE_NAME);
port = service.getIciContainerServiceSoap();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return port;
}
}
So....
How do I correctly subscribe for and receive phonecall events?
Turns out that it seemed to be working is that it was working. I was doing everything correctly on my side. The problem was that the user I was given to test with wasn't added to the correct group/queue so events weren't being sent.