Author Topic: Everything works fine except "Real Time monitoring" (live works)  (Read 4237 times)

clgit

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile

Hello everybody!  Thanks for your help in advance.

I read the documentation, searched google, forum, etc... I could not fix the issue   :-\.  ok, here is the problem:

Everything in queuemetrics works but the "Real Time Monitoring/Wallboard", the Live monitoring works fine. Note: Calls being processed works.

Using only one box, running Queumetrics 1.5.4  Java 1.5.0_11 , mysql 14.7 distrib 4.1.20 on Trixbox 2.2.4 and Asterisk 1.2.23.

1- User has the RTLIVE key (using admin)
2- I have clustering set up and the manager interface are set correctly
3- Api is enabled, login, password and IP are fine.
4- The calls reports work fine, reading from mysql.
5- The queue_log file is owned by asterisk.asterisk
6- Clocks are fine
7- Agents can log in/log out fine.

Screenshots:

http://img527.imageshack.us/img527/4406/43338189.png

http://img504.imageshack.us/img504/1796/87891053.png

http://img208.imageshack.us/img208/3946/84050015.png

http://img291.imageshack.us/img291/6378/21719160.png

Don't know what else to do.   :-[  Sorry about my english.

Best Regards,

Teo.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Everything works fine except "Real Time monitoring" (live works)
« Reply #1 on: September 29, 2009, 09:00:32 »
From what I'm seeing, the realtime page does show calls being processed but it does not show agents logged in. Is this correct?
How do you log-in and log-off agents?
Can you post a piece of your queue_log when the agent logs in and then out again?

clgit

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Everything works fine except "Real Time monitoring" (live works)
« Reply #2 on: September 29, 2009, 17:00:51 »
Hello!

Thanks a lot for your quick reply!   Yes, that is correct. The realtime page does show calls being processed but it does not show agents logged in neither the "active queues", I have to click on "Show All Queues"  to see the queue.

The only queue we have has the number 900.  We log-in and log-ff agents dialing:  900* from the agent's phone , it asks for the agent number, and thats it.  To log-off  they dial  900** and enter the agent number, from any phone .

Now, I also logged-in agents using the Queuemetrics Agent Page,  they were logged in successfully,  but it neither showed the agents on the realtime page.

When the agents logs in and then out again, nothing happens in the /var/log/asterisk/queue_log   file  , here is the asterisk cli output, I though it may help:
   

    -- Executing Read("IAX2/boxa-user-2", "CALLBACKNUM|agent-user") in new stack
    -- Playing 'agent-user' (language 'en')
    -- User entered '227'
    -- Executing GotoIf("IAX2/boxa-user-2", "0?5:7") in new stack
    -- Goto (macro-agent-add,s,7)
    -- Executing GotoIf("IAX2/boxa-user-2", "0?9:8") in new stack
    -- Goto (macro-agent-add,s,8)
    -- Executing AddQueueMember("IAX2/boxa-user-2", "900|Local/227@from-internal/n") in new stack
    -- Executing UserEvent("IAX2/boxa-user-2", "Agentlogin|Agent: 227") in new stack
    -- Executing Wait("IAX2/boxa-user-2", "1") in new stack
    -- Executing Playback("IAX2/boxa-user-2", "agent-loginok") in new stack
    -- Playing 'agent-loginok' (language 'en')


Thank you very much again!   Best Regards,


Teo


clgit

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Everything works fine except "Real Time monitoring" (live works)
« Reply #3 on: September 29, 2009, 20:32:03 »

Hello again!!

After what you asked me in the last post, I though: ok, so Realtime search the data in the queue_log file or mysql from the data in the queue_log file.

Then I googled I found that in Asterisk 1.2 the addmember function doesn't write  in the queue_log when the agent logged in/off.

So I debugged for a while I found that the file: extensions.conf  had the 900*  function. Then based on the following website:  http://astrecipes.net/index.php?from=100&q=astrecipes/managing+agents+that+dynamically+log-on  ,  I added one extra line to the extensions.conf  as follows: 

[macro-agent-add]
exten => s,1,Wait(1)
exten => s,2,Macro(user-callerid,SKIPTTL)
exten => s,3,Read(CALLBACKNUM,agent-user)       ; get callback number from user
exten => s,4,GotoIf($["${CALLBACKNUM}" = ""]?5:7)       ; if user just pressed # or timed out, use cidnum
exten => s,5,Set(CALLBACKNUM=${CALLERID(number)})
exten => s,6,GotoIf($["${CALLBACKNUM}" = ""]?2) ; if still no number, start over
exten => s,7,GotoIf($["${ARG2}" = ""]?9:8 )      ; arg2 is queue password
exten => s,8,Authenticate(${ARG2})
exten => s,9,AddQueueMember(${ARG1}|Local/${CALLBACKNUM}@from-internal/n)       ; using chan_local allows us to have agents over trunks
exten => s,10,UserEvent(Agentlogin|Agent: ${CALLBACKNUM})
exten => s,11,System( echo "${EPOCH}|${UNIQUEID}|${ARG1}|Agent/${CALLBACKNUM}|ADDMEMBER|-" >> /var/log/asterisk/queue_log )   <<<<----  I added this one
exten => s,12,Wait(1)
exten => s,13,Playback(agent-loginok)
exten => s,14,Hangup()

[macro-agent-del]
exten => s,1,Wait(1)
exten => s,2,Macro(user-callerid,SKIPTTL)
exten => s,3,Read(CALLBACKNUM,agent-user)       ; get callback number from user
exten => s,4,GotoIf($["${CALLBACKNUM}" = ""]?5:7)       ; if user just pressed # or timed out, use cidnum
exten => s,5,Set(CALLBACKNUM=${CALLERID(number)})
exten => s,6,GotoIf($["${CALLBACKNUM}" = ""]?2) ; if still no number, start over
exten => s,7,RemoveQueueMember(${ARG1}|Local/${CALLBACKNUM}@from-internal/n)
exten => s,8,UserEvent(RefreshQueue)
exten => s,9,Wait(1)
exten => s,10,Playback(agent-loggedoff)
exten => s,11,System( echo  "${EPOCH}|${UNIQUEID}|${ARG1}|Agent/${CALLBACKNUM}|REMOVEMEMBER|-|${RV}" >> /var/log/asterisk/queue_log )   <<<---- And this one too
exten => s,12,Hangup()

Reloaded the configuration and it now shows info!!!  Great!!  Thanks a lot!!   :D  :D  :D

So now, the things to resolve are, the queue doesn't appear as active in the queue list, it only appears when I press "Show all Queues", later some info missing from the agent list:

http://img210.imageshack.us/img210/1503/47845534.png

I really appreciate your help!

Thanks a lot in advance!  Best Regards,


Teo

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Everything works fine except "Real Time monitoring" (live works)
« Reply #4 on: October 01, 2009, 12:45:05 »
That's it! Great job man!