app_queue: Add dialplan function to get the channel name at the specified position...
authorRichard Mudgett <rmudgett@digium.com>
Fri, 3 Oct 2014 18:54:53 +0000 (18:54 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 3 Oct 2014 18:54:53 +0000 (18:54 +0000)
commitcc11a78869eb2f0b5f75330c426b62cbfecb88fd
tree75ef79676c3e1baa37ce7fb11fed2917e22becf1
parent0165c5f95aa058b0884f8dec8695237cb0bef186
app_queue: Add dialplan function to get the channel name at the specified position in a queue.

The QUEUE_GET_CHANNEL function returns the caller's channel name at the
specified position in a queue.

QUEUE_GET_CHANNEL(<queuename>[,<position>])

The queue position parameter defaults to 1 if not specified.

Noop(${QUEUE_GET_CHANNEL(queuename, 2)})
"SIP/peer-00000002", if queue exist and have at least 2 callers

Noop(${QUEUE_GET_CHANNEL(queuename, 1)})
Noop(${QUEUE_GET_CHANNEL(queuename)})
"SIP/peer-00000000", if queue exist and have at least 1 caller

ASTERISK-24365 #close
Reported by: Kristian Hogh
Patches:
      queue_get_firstchannel.patch (license #6639) patch uploaded by Kristian Hogh
      rb4035.patch (license #6639) patch uploaded by Kristian Hogh
      Patch morphed from QUEUE_GET_FIRSTCHANEL to the more general QUEUE_GET_CHANNEL
      on reviewbord.

Review: https://reviewboard.asterisk.org/r/4035/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_queue.c