EDIT: I tought it was working, but QM is adding Local/[agentnumber]@interno to the queue. [agentnumber] is an invalid extension, the extension the agent currently is at is completely ignored. That makes sense because the agent never logged in, so there's no way to bind an agent number to an extension number. At least, not that I know of.
Also, I can't pause and unpause agents because the commands use the Agent channel, like this:
; extension 22: agent pause (with pause code)
exten => 22,1,Answer
exten => 22,2,NoOp( "QM: Pausing Agent/${AGENTCODE} with pause reason '${PAUSEREASON}' made by '${QM_LOGIN}' " )
exten => 22,3,PauseQueueMember(,Agent/${AGENTCODE})
exten => 22,4,System( echo "${EPOCH}|${UNIQUEID}|NONE|Agent/${AGENTCODE}|PAUSEREASON|${PAUSEREASON}" >> /var/log/asterisk/queue_log )
exten => 22,5,Hangup
; extension 23: agent unpause
exten => 23,1,Answer
exten => 23,2,NoOp( "QM: Unpausing Agent/${AGENTCODE} made by '${QM_LOGIN}' " )
exten => 23,3,UnpauseQueueMember(,Agent/${AGENTCODE})
exten => 23,4,Hangup
Any workaround for that?