You can do already do it by using some custom tweaks in FOP2Callsbacks.pm.
We already do this kind of integration for users of Asternic Call Center Stats Pro, where you have a way to assign queues to agents, and fop2 will read that configuration to auto add users to queues upon login.
This might help you out getting started on your own implementation:
FOP2Callbacks.pm
...
} elsif($command eq "auth") {
my $exten = "";
if($parameters[2] == 1) {
$exten = $parameters[0];
}
$return = "Action: Originate\r\n";
$return .= "Channel: Local/".$exten;
$return .= "\@custom-fop2-autologin\r\n";
$return .= "Application: Noop\r\n";
$return .= "\r\n";
push @allreturn, $return;
return @allreturn;
} elsif .....
extensions_custom.conf
[custom-fop2-autologin]
exten => _X.,1,Verbose(Auto Login ${EXTEN})
exten => _X.,n,Set(NAME=${DB(AMPUSER/${EXTEN}/cidname)})
exten => _X.,n,Set(DEVI=${DB(DEVICE/${EXTEN}/dial)})
exten => _X.,n,Gosub(custom-query-queues,${EXTEN},1)
exten => _X.,n,Verbose(${AGENTQUEUES})
exten => _X.,n,Set(i=1)
exten => _X.,n,While($[${i}<=${FIELDQTY(AGENTQUEUES,\,)}])
exten => _X.,n,Set(CURRENT_QUEUE=${CUT(AGENTQUEUES,\,,${i})})
exten => _X.,n,Verbose(${CURRENT_QUEUE})
exten => _X.,n,AddQueueMember(${CURRENT_QUEUE},Local/${EXTEN}@from-internal/n,,,${NAME},${DEVI})
exten => _X.,n,Set(i=$[${i}+1])
exten => _X.,n,EndWhile
exten => _X.,n,Hangup
The example is not complete but you might get the idea.