Author Message
LAWRENCERIZZO
Joined: Jan 18, 2014
Messages: 6
Offline
Hello!

I have written a JTAPI application that interfaces a CRM system and allows outbound dialing using a fastConnect method call. Up until now, I have basically used the connectionEstablished and connectionDisconnection events to store CALL START and CALL END time. A recent request was made to make the my application's call logging equal to the CDR/Call Accounting Package records (using Microcall) which always seems 2-3 seconds after connectionEstablished START TIME.

In trying to isolate the events needed to capture with JTAPIEX, it appeared that the connectionAlering could be a better place to put my CALL START TIME. The problem is that I don't always see this event come through. (See code snippet, "Alerting event fired.") It just seems to sporadically run the code, and when it does, my records match the calling accounting records. (For both answered and unanswered calls, which is vital to this project.)

Any thoughts on what I might be missing? Any other recommendations on how I can best emulate the call records being sent out to the call accounting software?

Thank you!
Larry

Snippet:
----------------------------------------------------------------------------
private class CCCLAdapter extends CallControlConnectionListenerAdapter {

@Override
public void connectionAlerting(CallControlConnectionEvent arg0) {
final CallControlConnectionEvent event = arg0;
String AvayaDeviceID;
String callingAddress;
String calledAddress;

// 03-30-17
System.out.println("Alerting event fired.");
LucentV5CallInfo lv5CallInfo = (LucentV5CallInfo) event.getCall();
String callUCID = "";
try {
callUCID = lv5CallInfo.getUCID();
try {
PBXCall avayaCall = currentAvayaCalls.get(callUCID);
avayaCall.CallStart = GetPBXTime();
avayaCall.LocalCallStart = GetLocalTime();
currentAvayaCalls.put(callUCID, avayaCall);
// Moved 03-30-17
System.out.println("Max Rings = " + avayaCall.MaxRings);
if (avayaCall.MaxRings > 0) {
AutoHangupThread autoHangupThread = new AutoHangupThread(avayaCall.ExtensionNumber, callUCID, avayaCall.MaxRings);
Thread AutoHangupThread = new Thread(autoHangupThread);
AutoHangupThread.start();
System.out.println("AutoHangupThread launched.");
}
} catch (Exception ex) { }
} catch (Exception e) { }

eventLogWindow.appendCommand("[" + extensionNumber + "] of call from [" + phoneNumber + "]\n",
CommandType.ALERTING, AvayaDeviceID);

}
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Online
The JTAPI Alerting event is triggered off the TSAPI Delivered event. I would expect you to see one for almost all calls to/from a monitored station. You can see more details about when the delivered event is triggered in the document "TSAPI for Avaya Communication Manager Programmer's Reference".

You should try to figure out if there is any pattern to the calls that do not give Alerting events. For example, outgoing calls over an Analog trunk will not.

If all else fails, have a look at the TSAPI events being sent to the client to see if there are any clues there. You can see these events in the client traces (see the JTAPI PG for details) or you can see them (more clearly) in the csta trace file on AE Services. Instructions for this are in the Devconnect Product FAQ "What is the procedure for enabling and accessing the AE Services logs for TSAPI (trace, tracing, g3trace, csta_trace)?". It is in the "FAQ: AE Services TSAPI -> General" section.

Martin
Go to:   
Mobile view