Author Message
Narsimha
Joined: Jan 31, 2017
Messages: 15
Offline
Hi,

I have a use-case where we need to check the status of an avaya-extension and un-register it if it is already registered.
I am doing something like this using DMCC java api:

RegistrationServices regSvcs;
UnregisterTerminalRequest unregisterRequest = new UnregisterTerminalRequest();
unregisterRequest.setDevice(deviceID);
regSvcs.unregisterTerminal(unregisterRequest);

I am getting device Id using DeviceServices as shown below:

DeviceInstance deviceInstance = DeviceInstance.VALUE_0;
DeviceServices devSvcs;
devSvcs =(DeviceServices) provider.getService(
com.avaya.csta.device.DeviceServices.class.getName());

GetDeviceId devRequest = new GetDeviceId();
if (callServerName != null && callServerName.length()>0) {
devRequest.setSwitchName(callServerName);
}
if (callServerAddress != null && callServerAddress.length()>0) {
devRequest.setSwitchIPInterface(callServerAddress);
}

devRequest.setExtension(extension);
devRequest.setDeviceInstance(deviceInstance);

GetDeviceIdResponse devResponse = devSvcs.getDeviceID(devRequest);
deviceID = devResponse.getDevice();

I am getting a resource busy exception when I try to get deviceId if an extension is already registered and being used.

Is there any way I can un-register the extension being used by other application.


MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Online
In normal use, it is not possible for one application to get a Device Instance that is in use by another. Therefore, it cannot unregister the terminal that was registered by the other application.

However, if both applications use the "Controllable by other session" option when getting the device ID. they can share a Device Instance and then one application will be able to unregister the others terminal.

It's not something that I would normally recommend as it can lead to confusing results. I suggest that you read the Programmers Guide and maybe "Mastering Device,
Media and Call Control Using Avaya DMCC Dashboard" as well as experimenting with the DMCC Dashboard.

Martin
Narsimha
Joined: Jan 31, 2017
Messages: 15
Offline
Thanks for the reply Martin. I will try out options and will get back if I need any assistance.
Go to:   
Mobile view