How to get return value of Queue Application

Hi,

I know that the Queue Application provides an return value by which you can see if the call has been answered or was rejected because of timeout and so on.

But how can I get this value within my dialplan?

I want to use something like that:

123,1,GotoIf($[${Queue(…) = 0]?..:…)

But this does not work because * show me the following error:

Function is not registered!

So, can someone tell me how to get the value to compare it???

Thanx a lot

You are calling “Queue” as a function. I think you will want to use a gotoif with checking the “QUEUESTATUS” variable.

Do you have an example solution? I can not find information about this variable. But at the moment I do not think that this variable is the solution.

For example:
When the queue is quite full or if the call has not been answered within the specified time, I would like to transfer the calling party to another queue. If the call has been answered and has not been transfered, I would like to hangup the calling channel or play some sounds before hanging up.

If there is a possible solution using the named variable, please tell me. That would be very nice!

You can specify a timeout on the Queue application which when reached will jump to the next priority and you would want to call another Queue in your case. You can also specify the amount of people allowed in a queue with “maxlen” in queues.conf.

I know and i also know how to specify this timeout. But when I am in the dialplan and the caller leaves the queue I want to decide why he is leaving. There are the following possibilities:

  1. Call answered and channel should be hung up
  2. Call has been within the queue for the specified timeout and has not been answered and should be put into another queue

It should look like this:

123,1,GotoIf($[${Queue(queue_a,…|240)} = 0]?123,2:123,3)
123,2,Queue(queue,b,…|240)
123,3,HangUp()

I want to use the return variable to decide whether to go to priority 2 (if Queue returns 0) or to priority 3 (if Queue returns -1).