cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
496
Views
1
Helpful
6
Replies
Highlighted
Beginner

Hold/Resume using Cisco JTAPI (java)

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.

Everyone's tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Beginner

Re: Hold/Resume using Cisco JTAPI (java)

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.

6 REPLIES 6
Beginner

Re: Hold/Resume using Cisco JTAPI (java)

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

Beginner

Re: Hold/Resume using Cisco JTAPI (java)

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 .

Beginner

Re: Hold/Resume using Cisco JTAPI (java)

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

Beginner

Re: Hold/Resume using Cisco JTAPI (java)

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

Beginner

Re: Hold/Resume using Cisco JTAPI (java)

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.

Beginner

Re: Hold/Resume using Cisco JTAPI (java)

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.

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards