This can be done by using FOP2Callbacks.pm and custom contexts on your dialplan. Unfortunately I cannot provide you with a generic/fit all dialplan context, as every setup is different. The agent to be paused depends on your setup, if you use Local channeles, or Agent channels , or direct device SIP channels.
In FOP2Callbacks.pm replace the setastdb event with this:
if($command eq "setastdb") {
# Pause Local/xxxx@from-internal/n
$return = "Action: Originate\r\n";
$return .= "Channel: Local/".$parameters[2].":".$parameters[3];
$return .= "\@custom-logpause\r\n";
$return .= "Application: Noop\r\n";
$return .= "\r\n";
push @allreturn, $return;
return @allreturn;
And then have a custom-logpause context similar to this:
[custom-logpause]
exten => _X.,1,Verbose(Exten ${EXTEN})
exten => _X.,n,Set(ACLIDNUM=${CUT(EXTEN,:,1)})
exten => _X.,n,Set(PAUSECODE=${CUT(EXTEN,:,2)})
exten => _X.,n,Set(MIAGENTE=Local/${ACLIDNUM}@from-queue/n)
exten => _X.,n,Verbose(MIAGENTE = ${MIAGENTE})
exten => _X.,n,Verbose(ACLIDNUM = ${ACLIDNUM})
exten => _X.,n,Verbose(PAUSECODE = ${PAUSECODE})
exten => _X.,n,GotoIf($[ "x${PAUSECODE}" = "x" ]?unpause)
exten => _X.,n(pause),QueueLog(NONE,NONE,${MIAGENTE},PAUSE,${PAUSECODE})
exten => _X.,n,PauseQueueMember(,${MIAGENTE},,${PAUSECODE})
exten => _X.,n,Set(DB(PAUSECUSTOM/${ACLIDNUM})=${PAUSECODE}:${EPOCH})
exten => _X.,n,Goto(end)
exten => _X.,n(unpause),QueueLog(NONE,NONE,${MIAGENTE},UNPAUSE)
exten => _X.,n,UnPauseQueueMember(,${MIAGENTE})
exten => _X.,n,NoOp(${DB_DELETE(PAUSECUSTOM/${ACLIDNUM})})
exten => _X.,n(end),Verbose(Fin log pausa)
exten => _X.,n,Hangup
Modify to suit your config.