cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1557
Views
1
Helpful
6
Replies

Hold/Resume using Cisco JTAPI (java)

ehtasham.malik
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

6 Replies 6

pmnkumar
Level 1
Level 1

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

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 .

Ah yes, call.getConnections() and for each connection you can do getTerminalConnections() and get the terminal connection for the phone you are interested in.

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

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.

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.

Getting Started

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: