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?
Twilio makes answering a phone call as easy as responding to an HTTP request. When a Twilio phone number receives an incoming call, Twilio will send an HTTP request to your web application, asking for instructions on how to handle the call. Your web application will respond with an XML document containing TwiML.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With