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.");
}
}
}
}
}