Displaying 1 result from an estimated 1 matches for "queue_function_queuewaitingcount".
2009 Jul 22
3
ExecIf and empty variables (early evaluation)
Imagine that you have this code:
exten => _X!,n,Set(foo=${QUEUE_WAITING_COUNT(${QueueName})}))
If ${QueueName} happens to be unset, this will cause a warning:
[Jul 22 14:26:17] ERROR[8114]: app_queue.c:5187
queue_function_queuewaitingcount: QUEUE_WAITING_COUNT requires an
argument: queuename
The obvious solution:
exten => _X!,n,ExecIf($["${QueueName}" != ""]?Set(foo=${QUEUE_WAITING_COUNT(${QueueName})}))
However, this doesn't actually work! Functions and variables on the
right hand side are evaluated BEF...