03-18-2014 09:31 PM
Hi Team,
I have modified a softkey template to include the 'Record' button when the call state is 'connected'.
I also see that the 'Record' button is getting displayed when the call is active (Connected).
Is there a way to invoke the Record button via JTAPI? (some way to access the Component groups of a phone?)
We are using CUCM 9x version and I dont seem to access the phoneTerminal.(The below code prints not a phone terminal)
Sample Code:
try {
Terminal terminal = myprovider.getTerminal("5551212");
ComponentGroup groups[];
if (terminal instanceof PhoneTerminal) {
groups = ((PhoneTerminal)terminal).getComponentGroups();
} else{
System.out.println("Not a PhoneTerminal");
}
} catch (Exception excp) {
// Handle exceptions
}
Solved! Go to Solution.
03-20-2014 08:58 PM
Hi Yogesh,
Please try follow code,
Address address = this.provider.getAddress("1009");
Terminal[] ter = address.getTerminals();
for (int j = 0; j < ter.length; j ++) {
if ((ter[j].getName() != null) &&
(ter[j].getName().indexOf("SEP") != -1))
{
Terminal ct = (CiscoTerminal)ter[j];
if (ct != null)
{
ct.sendData("<CiscoIPPhoneExecute><ExecuteItem URL='Key:Soft1'/></CiscoIPPhoneExecute>");
}
}
}
I don't debug the codes, so there might be some errors. Please do it by yourself.
03-20-2014 08:19 PM
Yes, you can send action request from JTAPI client to CUCM, and trigger the softkey. But it's not very safe, for you should know the position of the key in the phone screen. Otherwise you may trigger another incorrect key.
Maybe the better way is to start recording via JTAPI client directly.
03-20-2014 08:31 PM
Hi Txuan,
We can ensure the position of the 'record' button, let's assume it is the first button.
Can you provide me the code snippet on how I can send the action request to CUCM?
Attached is the screenshot of the softphone.
Appreciate your help.
THanks
Yogesh
03-20-2014 08:58 PM
Hi Yogesh,
Please try follow code,
Address address = this.provider.getAddress("1009");
Terminal[] ter = address.getTerminals();
for (int j = 0; j < ter.length; j ++) {
if ((ter[j].getName() != null) &&
(ter[j].getName().indexOf("SEP") != -1))
{
Terminal ct = (CiscoTerminal)ter[j];
if (ct != null)
{
ct.sendData("<CiscoIPPhoneExecute><ExecuteItem URL='Key:Soft1'/></CiscoIPPhoneExecute>");
}
}
}
I don't debug the codes, so there might be some errors. Please do it by yourself.
03-20-2014 09:32 PM
I tried the following code:
CiscoTerminal terminal = (CiscoTerminal)myProvider.getTerminal("xxxxx");
terminal.sendData("<CiscoIPPhoneExecute><ExecuteItem URL='Key:Soft1'/></CiscoIPPhoneExecute>");
I dont see anything happening after that, no timeout error.. nothing. Tried with the debugger turned on(in eclipse) but nothing happens after executing the "senddata" line of code.
Should there be any additional permissions for the user?
Also tried to mute the call, but did not work.
"<CiscoIPPhoneExecute><ExecuteItem Priority=\"0\"URL=\"Key:Mute\"/></CiscoIPPhoneExecute>");
03-20-2014 10:19 PM
Have you turned on the JTAPI debug trace? Please check the jtapi log for the error details.
03-20-2014 10:30 PM
Here is the link for enabling jtapi trace.
https://developer.cisco.com/site/collaboration/call-control/jtapi/wiki/case-opening-steps/index.gsp
03-23-2014 11:26 PM
Bang on target
Thanks that helped, sendData() works just fine.
Just curious on why the "javax.telephony.phone.*" package was deprecated? is there any alternative?
Thanks
Yogesh
06-23-2020 07:36 AM
Hi,
I tried to mute myself from the call using JTAPI by using sendData(byte[]) and send the following XML to this:
<CiscoIPPhoneExecute><ExecuteItem Priority="0" URL="Key:Mute"/></CiscoIPPhoneExecute>
This is working on Cisco IP communicator but not working on Cisco Jabber softphone. Any suggestions on this..?
07-07-2020 04:12 PM
Unfortunately, control of audio parameters is not supported via JTAPI. As you discovered, you can use IPPS key presses to do this for physical phones that support IPPS, but unfortunately there is no equivalent for Jabber softphones.
If you really need to do this, you might be able to use OS media APIs to control the microphone (plus things like volume, etc.) If your app runs on a separate server, I guess you could create a small app/service that runs on the user's PC and connects to your server app via a custom API...
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: