Author Message
dbrundage
Joined: Aug 24, 2016
Messages: 12
Offline
Using a CallListener, I can detect callIntercepted, callAnswered and callTerminated events.

Are there events generated for when a call is put on hold, muted, transferred... and assuming there is where can I find the documentation that describes what events are generated and how to subscribe to them?
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Unfortunately, those events are not available from the Breeze Java API. If Engagement Call Control is available, you can use that API to subscribe for such events. This API uses AES on the back end. You would either be able to use the REST interface to Engagement Call Control to subscribe, or you could use the Breeze Eventing Framework API to subscribe to the "REST Call" event family.
dbrundage
Joined: Aug 24, 2016
Messages: 12
Offline
Thanks Joel. We have access to Engagement Call Control. So, just to be clear, is there a way to add the access to ECC to Engagement Designer or does that have to be done in Java code?
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
There are a few complexities with respect to subscribing to ECC from Engagement Designer. You can't do it without an assist from a Java snap-in because the Breeze node that publishes the ECC event may not be the one that has the SIP call associated with the Engagement Designer workflow. We are considering an enhancement that would ensure that the server publishing the ECC event is the same server that has a SIP call with the same UCID. This enhancement has not yet been scheduled.

Here are two ways that this could be accomplished with the assistance of a Java snap-in, with one being more efficient though more complex. In both cases, you'd need to define your own event family and types with the events and data you care about. In both cases, you'd use the Receive or a Message Boundary Event task to cause EngagementD to subscribe for your custom event type(s). You could filter on the UCID of the call.

Simpler but less efficient:
- On startup, your Java snap-in on each server instance would use the ECC REST interface to subscribe for each station you want to monitor. The callback URL would use the server IP address rather than the cluster IP address.
- When ECC publishes an event, it would publish to your snap-in instance on all Breeze servers in the cluster.
- Your snap-in would then publish the event on the local Eventing Framework.
- Your workflow instance would be triggered on the node that cares about this particular call. The event would be dropped on all other nodes.

More complex, but more efficient:
- On startup, your Java snap-in would use the Java Eventing Framework API to subscribe for ECC events for each station you want to monitor. No callback URL is needed since you're using the Java API.
- When ECC publishes an event, only one instance of your snap-in would receive the event. This instance may or may not be the one that is local to the Engagement Designer workflow instance operating on the call.
- You can then look up the call using CallFactory.getCall(ucid). After that, you can do a CallProperties.isHostedOnLocalNode(call). If it is, publish your event using the Java EventingFramework API.
- If the call is not local, invoke CallProperties.getNodeThatHostsThisCall(call).
- Once you have the IP address of the node that hosts the call, you could invoke the HTTP interface on the EventingConnector on that node to publish your event.
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
By the way, there is unfortunately not any way to get events for mute/unmute. You can detect hold/unhold.
dbrundage
Joined: Aug 24, 2016
Messages: 12
Offline
A couple of questions based on the "More complex, but more efficient" response:

1) Where can I find documentation on the Java Eventing Framework API?
2) For the java snap-in that would register for these events, where should I put the code to subscribe for the events to ensure that it runs?
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Please check out the Breeze Javadoc:
http://www.devconnectprogram.com/site/global/api-refs/breeze-3_2/index.html

Look at the packages com.avaya.collaboration.eventing and com.avaya.collaboration.eventing.sample. You can also then check the Engagement Call Control API reference for details on the events. The event family is REST CALL.

Look at com.avaya.collaboration.service.ServiceLifeCycle for information on how to create an init() method where you can put your initial subscription code.
dbrundage
Joined: Aug 24, 2016
Messages: 12
Offline
Should I receive the EventFamilyEventing.EVENT_SUBSCRIPTION_EXPIRING_QUALIFIED event by default if I have subscribed to EventFamilyRestCall.FAMILY_NAME? In the API example, I don't anything specific being done to receive this event, however I have yet to see such an event being fired with my snap-in deployed. Note that I do see a SUBSCRIPTION_STATUS event almost immediately after the snap-in is deployed.
Go to:   
Mobile view