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;
}
}
|