B.1. AddQueueMember()

Dynamically adds an interface into the queue.
Dynamically adds the specified interface to the specified queue, which is configured in queues.conf. The penalty setting, if provided, will influence the priority assigned to the interface in the queue. Agents with lower penalty values will receive calls before agents with higher penalty values.
If the specified interface is already in the queue and the n+101 priority exists (where n is the current priority), the call jumps to that priority; otherwise an error code (-1) is returned. (Depending on the version of Asterisk, you may need to provide the j option to enable priority jumping.)
If AddQueueMember() is called without the interface parameter, the current user's active interface is used.
Some versions of Asterisk allow commas as an option separator.
This application sets the channel variable ${AQMSTATUS} to ADDED, MEMBERALREADY (member exists in the queue) or NOSUCHQUEUE (queue does not exist) depending on circumstance.
; add SIP/3000 to "supportqueue":
exten => 123,1,AddQueueMember(supportqueue,SIP/3000)

; add the active interface with a penalty of 2:
exten => 123,1,AddQueueMember(supportqueue,,2)


Internal help for this application in Asterisk 1.4:
  -= Info about application 'AddQueueMember' =- 

Dynamically adds queue members

Dynamically adds interface to an existing queue.
If the interface is already in the queue and there exists an n+101 priority
then it will then jump to this priority.  Otherwise it will return an error
The option string may contain zero or more of the following characters:
       'j' -- jump to +101 priority when appropriate.
  This application sets the following channel variable upon completion:
     AQMSTATUS    The status of the attempt to add a queue member as a 
                     text string, one of
Example: AddQueueMember(techsupport|SIP/3000)
diff output to internal help in Asterisk 1.2:
- none -