Getting presence via call control API

Discussion in '3CX Phone System - General' started by jamesdawson, Feb 5, 2014.

Thread Status:
Not open for further replies.
  1. jamesdawson

    Joined:
    Jan 30, 2014
    Messages:
    21
    Likes Received:
    0
    Hi, is there a way of getting presence via the call control API?

    I can't see anything in the help file from the examples. I've poked around using intellisense and just writing out various properties. I though that extension.userstatus might have given it me, but it only changes from available to away which is triggered by DND. I cannot detect if the user in on a call. I can see if the are registered or not, so I think it's only the on call / free line flag I need to find. is that available somewhere?

    or should I check extension.activeconnections and if there is any assume the user is "on a call"?

    code below:

    Code:
            public void GetqUsers(string ext)
            {
                PhoneSystem ps = PhoneSystem.Root;
                foreach (Queue aq in ps.GetQueues())
                {
                    if (ext == aq.Number)
                    {
                        foreach (DN amem in aq.Members)
                        {
                            Console.WriteLine("Q: " + aq.Name + " user: " + amem);
                            Extension anex = (Extension)amem;
                            Console.WriteLine(anex.Number + " users status: " + anex.UserStatus + " q status: " + anex.QueueStatus  + " registered " + anex.IsRegistered );
                      
                        }
                    }
                }
    
    
            }

    }
    }
    }


    }
     
  2. dab

    dab

    Joined:
    Nov 1, 2009
    Messages:
    67
    Likes Received:
    1
    Any update? I'm very interested in this feature too.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.