Author Message
Kirthika.Chandru
Joined: Feb 18, 2014
Messages: 50
Offline
Hi

I am using the calllog sample application to monitor the Outbound call. I need to capture the called number busy, ring no answer , abonded call. Could any one let one let me the events for Ring No Answer and Busy and Caller not reachable


public void handleOutgoingCall( CallControlConnectionEvent event )
{
Terminal callingTerminal;
Address callingAddress;
Address calledAddress;
UserToUserInfo avayaUUI = null;
String calledNumber = "<Unknown>";
Address address;
Call call;
String name = "";

try {
callingTerminal = event.getCallingTerminal();

// first verify that the callingTerminal is our terminal
if ( myTerminal.equals ( callingTerminal ) ) {

address = event.getConnection().getAddress();
callingAddress = event.getCallingAddress();
calledAddress = event.getCalledAddress();

if ( address != null && callingAddress != null ) {

// verify if this CallCtlCallEv belongs to the terminating end of the call
if ( !( address.equals ( callingAddress ) ) ) {

Date d = new Date();

// get called number information
if ( calledAddress != null ) {
calledNumber = calledAddress.getName();
}

// get called number information
if ( calledAddress instanceof LucentAddress ) {

try {
name = ( (LucentAddress) calledAddress).getDirectoryName();
}
catch ( Exception e ) {}
}

if ( name == null ) {
name = calledNumber;
}

// log call
trace.append( DateFormat.getDateTimeInstance().format(d) + " Call made to: " + name + " [" + calledNumber + "]");

call = event.getCall();
// verify if there is UUI along with this call
if ( call instanceof LucentCallInfo ) {

if ( event.getID() == CallControlConnectionEvent.CALLCTL_CONNECTION_NETWORK_REACHED ) {
trace.append(" UUI: <unknown>\n\n");
} else {
avayaUUI = ( (LucentCallInfo) call ).getUserToUserInfo();
if ( avayaUUI != null ) {
String uui = avayaUUI.getString();
trace.append(" UUI: " + uui + "\n\n");
} else {
trace.append(" UUI: <none>\n\n");
}
}
}
}
}
}
} catch (Exception e) {
trace.append( "handleOutgoingCall() caught " + e + "\n");
trace.append( "Message: " + e.getMessage() + "\n\n" );
return;
}
}
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Online
Most events will contain a Cause which should help you to find what caused it. You may find the JTAPI exerciser a convenient way to see these and what they contain. eg. the following for destination unreachable:

16:20:48 Event received by CallListener:[com.avaya.jtapi.tsapi.impl.events.conn.LucentV5CallControlConnectionEvent]
Request: ConnectionEvent.getConnection()
=>ConnectionEvent.getConnection() returned: 40666_c[15]

Event.getID() =>CallControlConnectionFailedEvent
Event.getCause() =>CAUSE_DEST_NOT_OBTAINABLE
Go to:   
Mobile view