Author Message
saurabhdare
Joined: Mar 9, 2018
Messages: 8
Offline
Hello Devs, I have written conference code and transfer code using jtapi 1.4 api. I have replaced deprecated CallControlCallObserver interface with CallControlCallListener interface but what is the replacement for CallCtlConnInitiatedEv.ID in jtapi 1.4? How to handle events in 1.4 api?
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Offline
What do you use CallCtlConnInitiatedEv.ID for?
saurabhdare
Joined: Mar 9, 2018
Messages: 8
Offline
I am unable to import provider object in this code and I don't know what should be the "DATA/CLASS-TYPE" of thisAddress and superVisorAddress?
public class ConferenceObserver implements CallControlCallListener {


public void callChangedEvent(CallEv[] evlist) {
for (int i = 0; i < evlist.length; ++i) {
CallEv e = evlist[i];
if (e instanceof TermConnEv) {
Call thisCall = e.getCall();
TerminalConnection tc= ((CallControlCall) thisCall).getConferenceController();
Connection[] connections = thisCall.getConnections();
TerminalConnection[] tcs = connections[0].getTerminalConnections();
if (tcs.length > 0 && tc == null) {
tc = tcs[0];
}
if (tc == null) {
System.out.println("Conference Controller is null.");
} else {
try {
Call thisAddress = e.getCall();
Call superVisorAddress = e.getCall();
Call call = myprovider.createCall();
call.connect(thisAddress.getTerminals()[0], thisAddress, superVisorAddress);
((CallControlC[all) thisCall).conference(call);

} catch(Exception e1) {
System.out.println("Exceptions.");
}
}
}
}
}
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Offline
I'm sorry, I do not understand your question or how it relates to CallCtlConnInitiatedEv.ID.

Martin
Go to:   
Mobile view