Author Topic: Echoing Logon/Logoff events to realtime queue_log  (Read 3223 times)

trymes

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 0
    • View Profile
Echoing Logon/Logoff events to realtime queue_log
« on: January 13, 2011, 22:12:06 »
In the QM manual, a queue logon context is described that uses the following line to echo an event to the queue_log file:

exten => _422XX,3,System( echo "${EPOCH}|${UNIQUEID}|NONE|SIP/${EXTEN:3}|\AGENTLOGIN|-" >> /var/log/asterisk/queue_log )

Now, how would I accomplish the same thing with the built-in realtime queue_log in Asterisk 1.6+?

Many thanks,

Tom

trymes

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 0
    • View Profile
Re: Echoing Logon/Logoff events to realtime queue_log
« Reply #1 on: January 13, 2011, 22:15:18 »
I hate to answer my own question, but I'm guessing that the "QueueLog" application is the one that will be the answer to my question?

A specific entry that I ought to use for QM would still be helpful....

Tom

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Echoing Logon/Logoff events to realtime queue_log
« Reply #2 on: January 14, 2011, 09:48:08 »
Yes i think our demo dialplan does use the QueueLog application.

trymes

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 0
    • View Profile
Re: Echoing Logon/Logoff events to realtime queue_log
« Reply #3 on: January 20, 2011, 20:41:34 »
Can you point me to that? The manual still has the "echo" method I pasted above.

Tom

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Echoing Logon/Logoff events to realtime queue_log
« Reply #4 on: January 21, 2011, 09:15:37 »
I am quoting from our standard extensions_queuemetrics.conf:


Quote
[macro-queuelog]
; The advantage of using this macro is that you can choose whether to use the Shell version
; (where you have complete control of what gets written) or the Application version (where you
; do not need a shellout, so it's way faster).
;
; Expecting  $ARG1: Timestamp
;            $ARG2: Call-id
;            $ARG3: Queue
;            $ARG4: Agent
;            $ARG5: Verb
;            $ARG6: Param1
;            $ARG7: Param2
;            $ARG8: Param3
;
;exten => s,1,System( echo "${ARG1}|${ARG2}|${ARG3|${ARG4}|${ARG5}|${ARG6}|${ARG7}|${ARG8}" >> /var/log/asterisk/queue_log )
exten => s,1,QueueLog(${ARG3},${ARG2},${ARG4},${ARG5},${ARG6}|${ARG7}|${ARG8})

So you can see the equivalence.