Running trixbox 2.6.1, we have 5 queues. 2001 has 6 static agents. 2003-5 have the 2002 queue as their static agent. 2002 has no static agents.
People log in and out of this queue (2002) using a button featuring the queuetoggleaastra.php script.
We've started noticing that there are extra agents in the queue...
0^SIP/211
0^SIP/206
0^Local/203@from-internal/n
0^Local/207@from-internal/n
0^Local/211@from-internal/n
0^Local/206@from-internal/n
The bottom 4 are correct, the top two...
It's showing that 206 and 211 are logged in twice, which can't be right, can it?
Has anyone else noticed this, or does anyone know of a way to fix it?
Below is the queuetoggleaastra.php code incase anyone doesn't know it / it might help.
<?php
$agent = ($_SERVER['argv'][1] ? $_SERVER['argv'][1]:$_REQUEST['agent']);
$queue = ($_SERVER['argv'][1] ? $_SERVER['argv'][1]:$_REQUEST['queue']);
$clicommand = "asterisk -r -x 'add queue member Local/" . $agent . "@from-internal/n to " . $queue ."'";
exec( $clicommand, $response);
// some XML code to show status on phone display
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo "<AastraIPPhoneTextScreen>";
echo "<Title>Queue Toggle</Title><Text>";
if (strstr($response[0], 'Added')){
echo "Agent logged on : " . $queue;
}
else {
// Assume that agent was allreday in queue, so remove agent
$clicommand ="";
$response = "";
$clicommand = "asterisk -r -x 'remove queue member Local/" . $agent . "@from-internal/n from " . $queue ."'";
exec( $clicommand, $response);
echo "Agent logged off :" . $queue;
}
echo "</Text>";
echo "</AastraIPPhoneTextScreen>";
?>
Member Since:
2008-07-23