Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
exten => start,n,GotoIf($[${ISNULL(${xtn})}]?end)       ; if ${xtn} is null, then just Return()
exten => start,n,Playback(in-the-queue)                 ;   if not null, then playback "in the queue"
exten => start,n,SayNumber(${xtn})                      ;   and the queue number that we (un)paused from
exten => start,n(end),Return()                          ; return from were we came
Queue Variables

Sometimes you may want to retrieve information about a particular queue's state. You can do this by using Queue Variables, and its associated functions. For instance here is a contrived example of how to print a couple variables for the "thisQueue":

Code Block
exten => show_variables,1,NoOp()
  same => n,Noop(${QUEUE_VARIABLES(thisQueue)})
  same => n,Verbose(0,strategy = ${QUEUESTRATEGY})
  same => n,Verbose(0,calls = ${QUEUECALLS})
  same => n,Hangup()

Note, QUEUE_VARIABLES needs to be called with a valid queue name, and prior to calling the other queue variable functions in order to ensure retrieval of the correctly associated values for a given queue.

Conclusion

You should now have a simple system that permits you to login and out of queues you create in queues.conf, and to allow queue members to pause themselves within one or more queues. There are a lot of dialplan concepts utilized in this
article, so you are encouraged to seek out additional documentation if any of these concepts are a bit fuzzy for you.

...