« Back to Technical Questions

Can getCalls return all calls object of a dn ?

Combination View Flat View Tree View
Threads [ Previous | Next ]
The dn assigned dual-line. And the two lines are in use. (one is hold, one is talking)
I tried in this code on the address.

CMECall[] calls = cmeAddress.getCalls();
if (calls!=null) {
    for (int i=0;i<calls.length;i++) {
        CMECall call = calls;
        if (call != null) {
            System.out.printf("  GlobalCallId = %s\n", call.getGlobalCallId());
            System.out.printf("  State = %s\n", CMECall.State.toString(call.getState()));
            System.out.printf("  Type = %s\n", CMECall.Type.toString(call.getType()));
        }
    }
}

But getCalls method returned a call. (only HOLD)
I'm not sure I understand the problem. Could you explain in more detail?
 
Thanks

There should be two different call-id. One to het HOLD one to get CONNECTED.
 
Thanks

I added getTerminalConnections() method and run.
 
*** getCalls ***
0 ConState = HOLD
  GlobalCallId = C3693958-828711DF-80FB862D-2500BF02
  State = ACTIVE
  Type = DIRECT
*** getTerminalConnections ***
0 ConState = HOLD
  GlobalCallId = C3693958-828711DF-80FB862D-2500BF02
  State = ACTIVE
  Type = DIRECT
1 ConState = CONNECTED
  GlobalCallId = C811DB2F-828711DF-8102862D-2500BF02
  State = ACTIVE
  Type = DIRECT
 
getTerminalConnections() get both calls, but getCalls() get only HOLD call.
Could you find the miss in this code ?
Thanks

There are 2 call-id with 2 different states. They are from the same phone right ?
 
Then you got two states. Anything else are you looking for ?
 
Thanks
 
*** getCalls ***
0 ConState = HOLD
  GlobalCallId = C3693958-828711DF-80FB862D-2500BF02
  State = ACTIVE
  Type = DIRECT
*** getTerminalConnections ***
0 ConState = HOLD
  GlobalCallId = C3693958-828711DF-80FB862D-2500BF02

  State = ACTIVE
  Type = DIRECT
1 ConState = CONNECTED
  GlobalCallId = C811DB2F-828711DF-8102862D-2500BF02

  State = ACTIVE

  Type = DIRECT

Yes, from the same phone.
phone A make a call to phone B and phone B answer the call.
phone A hold the call.
phone A make a new call to phone C and phone C answer.
then, output the calls. (phone A monitored by API in this steps)