is extension logged in to queue ?

Discussion in 'Call Flow Designer' started by mirjam.nz, Sep 25, 2017.

Thread Status:
Not open for further replies.
  1. mirjam.nz

    Joined:
    Dec 6, 2010
    Messages:
    28
    Likes Received:
    0
    Hi all

    I try to find out if a specific extension is logged in to a queue via CFD.

    Following the thread "Find amount of available Call Queue agents" was leading me into the right direction and was very helpful, but I'm not quite there yet.

    In the queue log I do get the information which extensions are logged in and also its state, but I can not retrieve this in the code.

    Any help appreciated.

    Cheers
    Miriam
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,354
    Likes Received:
    108
    Hi @mirjam.nz,

    In the final release of the CFD we have included a new component named "Get Queue Extensions", which will give you that information. Here you have information about that component:
    https://www.3cx.com/docs/manual/cfd-components

    In that component you specify the queue extension number, and the state you need, for example Logged In, and then it will return a list of extensions logged in to that queue. You can iterate the list returned to check if a specific extension is there or not.

    However, you can still use the code you created if you prefer. In that case, let me know what the problem is, so I can help you out. Your code can return a single value, so if you need to return many things at the same time you can use a struct or class to do it...

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mirjam.nz

    Joined:
    Dec 6, 2010
    Messages:
    28
    Likes Received:
    0
    Thanks Ernesto

    It would be extremely helpful if you could give me a quick examples on how to retrieve this.

    I have tried TcxGetQueueExtensions1 and then log it, but the output remains empty. Why? A example here would be much appreciated.

    Screen Shot 2017-09-26 at 9.48.48 AM.png

    Screen Shot 2017-09-26 at 9.49.33 AM.png


    Thanks
     
  4. mirjam.nz

    Joined:
    Dec 6, 2010
    Messages:
    28
    Likes Received:
    0
    I find the below in the CFD component documentation under "Get Queue Extensions configuration", but I do not understand how to use it.

    Quote: "In order to get the values from the resulting lists, we need to use the following CFD Functions:
    • GET_LIST_ITEM_COUNT: this function will give us the number of items in the list.
    • GET_LIST_ITEM: this function will return the item at a specific index."
     
  5. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,354
    Likes Received:
    108
    Hi @mirjam.nz,

    Exactly, the output properties (return values) for component "Get Queue Extensions" are lists. If you try to log them directly, you will not see the items inside. What you need to do is using functions GET_LIST_ITEM_COUNT and GET_LIST_ITEM to get the values you need. For example, if you need to know how many extensions were returned you use the following expression which will return that number:
    GET_LIST_ITEM_COUNT(TcxGetQueueExtensions1.ExtensionNumberList)

    So now let's say that you have 3 elements in that list, in order to get the extension numbers you can use the following expressions:
    GET_LIST_ITEM(TcxGetQueueExtensions1.ExtensionNumberList, 0)
    GET_LIST_ITEM(TcxGetQueueExtensions1.ExtensionNumberList, 1)
    GET_LIST_ITEM(TcxGetQueueExtensions1.ExtensionNumberList, 2)

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.