Author Topic: Asterisk 1.6 - Agents not logged appearing in Realtime  (Read 4802 times)

fpio

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
    • View Profile
    • Email
Asterisk 1.6 - Agents not logged appearing in Realtime
« on: March 09, 2010, 21:08:36 »
I'm using Asterisk 1.6 and the QM 1.5.5.

In realtime mode, when a call is waiting in the queue, the QM displays all agents who can answer the call, but really not all agents are logged on the server.

In my Dialplan use the command AgentLogin ().
The agents and queues configured in Mysql (Realtime).

Please help me!

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Asterisk 1.6 - Agents not logged appearing in Realtime
« Reply #1 on: March 10, 2010, 12:54:11 »
Not sure I understand - can you post a screenshot?

fpio

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
    • View Profile
    • Email
Re: Asterisk 1.6 - Agents not logged appearing in Realtime
« Reply #2 on: March 10, 2010, 15:57:07 »
In the screenshot below shows the QM in realtime with no agent logged:



To make sure there are no agents logged in:



I made a call to a particular queue, the QM is waiting for the call is answered, seeing that at that time appeared several agents. These are all players who can make call to that queue, but no one is logged in the system:



Again, to make sure that there are agents logged on (note the time that these screenshots were generated):



This occurs whenever a call comes in the queue. The QM displays all agents that can respond to this queue.
I noticed that when a call comes in line at the queue_log appears a few lines in the asterisk 1.4 never appeared.
I believe qloader is interpreting this line and including the agent as logged in, follow my file queue_log:

1268219165|REALTIME|fila_sac|agent/1001007|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001025|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001042|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001102|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001153|ADDMEMBER|
1268219165|1268219153.2|fila_sac|NONE|ENTERQUEUE||1130530???
1268219187|1268219153.2|fila_sac|NONE|ABANDON|1|1|22


Thanks!
« Last Edit: March 10, 2010, 19:11:36 by fpio »

fpio

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
    • View Profile
    • Email
Re: Asterisk 1.6 - Agents not logged appearing in Realtime
« Reply #3 on: March 10, 2010, 17:31:41 »
I found a solution, I do not know if it's the best, but for now is working.

I added an IF in qloader.pl to ignore the line in REALTIME queue_log:

sub insertRow {
       (...)
        if ( $cid ne "'REALTIME'" ) {
        my $sql = " INSERT INTO `queue_log`
                ( `partition` , `time_id` , `call_id` , `queue` , `agent` , `verb` , `data1` , `data2` , `data3` , `data4` )
                 VALUES
                ( '$partition', $tst, $cid, $que, $age, $verb, $d1, $d2, $d3, '' );";

        execQuery( $sql );

        $nImportLines +=1;
        if (( $nImportLines % $log_every_num ) == 0 ) { syslog( "Loaded $nImportLines lines so far..." ) };
        }
}

If anyone has another solution is welcome!
« Last Edit: March 10, 2010, 17:44:08 by fpio »

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Asterisk 1.6 - Agents not logged appearing in Realtime
« Reply #4 on: March 11, 2010, 10:06:38 »
I am not sure I understand - why wouldn't you want QM to process the lines like:

Code: [Select]
1268219165|REALTIME|fila_sac|agent/1001007|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001025|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001042|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001102|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001153|ADDMEMBER|

QM Shows them agents as they are known members of the queue - why shouldnt't it?

fpio

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
    • View Profile
    • Email
Re: Asterisk 1.6 - Agents not logged appearing in Realtime
« Reply #5 on: March 11, 2010, 15:24:47 »
This line in the queue_log appears whenever a call comes in the queue.

Code: [Select]
1268219165|REALTIME|fila_sac|agent/1001007|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001025|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001042|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001102|ADDMEMBER|
1268219165|REALTIME|fila_sac|agent/1001153|ADDMEMBER|


The script qloader.pl interprets that the agent logged into the system because this line is the value ADDMEMBER.

They may make the call to that queue, but are not logged in Asterisk, so the QM displays in realtime the agent is available.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Asterisk 1.6 - Agents not logged appearing in Realtime
« Reply #6 on: March 12, 2010, 08:56:05 »
ADDMEMBER usually means "the agent logged in to this very queue"....