01-29-2018 10:01 PM
We have simple cisco jtapi application, the primary use of this application is to capture all event from CUCM (Call Answer, Call initiate, call hold, call resume, call transfer, call conf).
We are able to achieve call Answer and Call Initiate by using makeCall() method which is available in cisco guide.
But we are stuck at the point where we need to hold/resume/calltransfer functionality. Can anybody guide me how can we do this ??
Any help will be really helpful.
Solved! Go to Solution.
02-01-2018 12:06 AM
Do you have call observer on the called party? If your app is adding call observer on the called address or terminal, you should see a CallCtlTermConnRingingEv for the called Terminal. Can you check if you are seeing this?
This event indicates that the terminal connection is in correct state to call answer() API.
You will see only 1 terminal connection if you check the connections immediately after call.connect(). It takes a few milli seconds to see the terminal connection for called terminal. Use CallCtlTermConnRingingEv to answer the call.
01-30-2018 02:07 PM
Pseudo Code:
// To initiate or make a call use the following interface:
Call call = Call.connect(OriginatingTerminal, OriginatingAddress, "to Number");
//After the call is answered and media established between the phones:
//TerminalB is where you want to hold the call.
TermnialConnection [] termConns = call.getTerminalConnections();
TerminalConnection termConnB = null;
//find the terminal connection of B in this call. Terminal B could have other calls on hold, so this needed
for (termC in termConns){
if( termC.getTerminal() == TerminalB) {
termConnB = termC;
break;
}
}
if (termConnB != null ){
try {
termConnB.hold();
} catch (Exception exp){}
}
HTH
01-30-2018 10:40 PM
Thanks for your anser, but actually there is no method in call object which return TerminalConnection Array.
Call object has one method to return Connection but we can't case connection into the TerminalConnection .
01-31-2018 09:10 AM
Ah yes, call.getConnections() and for each connection you can do getTerminalConnections() and get the terminal connection for the phone you are interested in.
01-31-2018 11:21 PM
Thanks, now i have an issue while answering the call.
My code is something like that.
i got connections from the the call object.
connection[] con=call.getConnection();
i got two object, 1- for calling party, 2 -for called party.
Now when i tried extract TerminalConnection from CalledParty. It don't have any TerminalConnection ..
and TerminalConnection has only answer method. Now for called party TerminalConnection is getting null ..
How should i answer the call
Anyhelp
02-01-2018 12:06 AM
Do you have call observer on the called party? If your app is adding call observer on the called address or terminal, you should see a CallCtlTermConnRingingEv for the called Terminal. Can you check if you are seeing this?
This event indicates that the terminal connection is in correct state to call answer() API.
You will see only 1 terminal connection if you check the connections immediately after call.connect(). It takes a few milli seconds to see the terminal connection for called terminal. Use CallCtlTermConnRingingEv to answer the call.
02-01-2018 01:43 AM
Thank you so much it wokring now.
Now for cosult call i am getting the terminal from provider but again TerminalConnection is null, I have added that extension into the observer but still its TerminalConnection is null.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide