Hi Team,
i have seen API set for PhoneTerminal where we can set for Mute and Full voulme in the setGain method but the same is not working with the below code. can you please confirm whether PhoneTerminal is implemented or not? am using JTAPI version 5.2.0.454.
try {
ComponentGroup groups[] = null;
Terminal terminal = jtapiInterface.getTerminal("");
if (terminal instanceof PhoneTerminal) {
groups = ((PhoneTerminal)terminal).getComponentGroups();
}
if (groups != null && groups.length >= 1){
for( ComponentGroup cg : groups )
cg.activate();
Component components[] = groups[0].getComponents();
for (Component comp : components ){
if (comp instanceof PhoneMicrophone){
logger.info("mute status:"+((PhoneMicrophone) comp).getGain());
if(((PhoneMicrophone) comp).getGain()!=PhoneMicrophone.MUTE){
((PhoneMicrophone)comp).setGain(PhoneMicrophone.MUTE);
}
}
}
}else{
logger.info("groups are empty");
}
logger.info("in unmute end");
}catch (Exception e) {
LogException.logStackTrace(e, "CiscoCallManager.class", logger);
}
|