Hello everyone ,
I am doing a program where I am only taking the call culmination events. I just want to make the filter by a certain parameter. It is possible to filter by the campaign, campaign group or queue or other information with the objective to discriminate some unnecessary events. Is this possible?
Here is my code fragment:
[code]
package com.genesys.ivrvox.manager;
import com.genesys.ivrvox.conexion.Conexion;
import com.genesyslab.platform.commons.collections.KeyValueCollection;
import com.genesyslab.platform.commons.protocol.Message;
import com.genesyslab.platform.commons.protocol.MessageHandler;
import com.genesyslab.platform.commons.protocol.ProtocolException;
import com.genesyslab.platform.commons.protocol.RegistrationException;
import com.genesyslab.platform.configuration.protocol.confserver.requests.objects.RequestReadObjects;
import com.genesyslab.platform.routing.protocol.routingserver.requests.RequestNotify;
import com.genesyslab.platform.voice.protocol.TServerProtocol;
import com.genesyslab.platform.voice.protocol.tserver.events.EventEstablished;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Home
*/
public class ManagerHandleEvent implements Runnable {
private TServerProtocol tserverProtocol;
public ManagerHandleEvent() {
try {
tserverProtocol = Conexion.tServerProtocol();
} catch (IllegalStateException ex) {
Logger.getLogger(ManagerHandleEvent.class.getName()).log(Level.SEVERE, null, ex);
}
}
public void run() {
try {
tserverProtocol.setMessageHandler(new MessageHandler() {
public void onMessage(Message msg) {
if (msg instanceof EventEstablished) {
EventEstablished eventStablished = (EventEstablished) msg;
System.out.println(eventStablished.getUserData());
//KeyValueCollection keyValueCollection =eventStablished.getUserData();
//keyValueCollection.
}
}
});
tserverProtocol.open();
RequestNotify request = RequestNotify.create();
tserverProtocol.send(request);
} catch (RegistrationException ex) {
Logger.getLogger(ManagerHandleEvent.class.getName()).log(Level.SEVERE, null, ex);
} catch (ProtocolException ex) {
Logger.getLogger(ManagerHandleEvent.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalStateException ex) {
Logger.getLogger(ManagerHandleEvent.class.getName()).log(Level.SEVERE, null, ex);
} catch (InterruptedException ex) {
Logger.getLogger(ManagerHandleEvent.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
[/code]