AstRecipes » AddQueueMember and the queue_log file
THIS NODE IS OUTDATED - IF YOU RUN QUEUEMETRICS 1.4 OR NEWER, SEE Managing agents that dynamically log-on
http://lists.digium.com/pipermail/asterisk-dev/2005-February/009615.html
1. when an agent logs off, they log how much time they have been on line
2. multiple logon/logoff lines are *bad* for log analysis This recipe presents a simple logon-logoff script that might help you in "faking it". Of course you should likely add authentication for a real-world usage. To do the adding, you dial 422XX, where XX is your local extension; the same goes to be removed from queue.
; addqueuemember - 422
exten => _422XX,1,Answer
exten => _422XX,2,AddQueueMember(my-queue,SIP/${EXTEN:3})
exten => _422XX,3,System( echo
"${EPOCH}|${UNIQUEID}|NONE|SIP/${EXTEN:3}|AGENTLOGIN|-" >> /var/log/asterisk/queue_log )
exten => _422XX,4,DBput(dynlogin/log_Agent-${EXTEN:3}=${EPOCH})
exten => _422XX,5,Hangup
; removequeuemember - 423
exten => _423XX,1,Answer
exten => _423XX,2,RemoveQueueMember(my-queue,SIP/${EXTEN:3})
exten => _423XX,3,DBget(ORGEPOCH=dynlogin/log_Agent-${EXTEN:3})
exten => _423XX,4,Set(RV=$[${EPOCH} - ${ORGEPOCH}])
exten => _423XX,5,GotoIf($["${RV}" = "0"]?8:6)
exten => _423XX,6,System( echo "${EPOCH}|${UNIQUEID}|NONE|SIP/${EXTEN:3}|AGENTLOGOFF|-|${RV}" >> /var/log/asterisk/queue_log )
exten => _423XX,7,DBdel(dynlogin/log_Agent-${EXTEN:3})
exten => _423XX,8,Hangup
Softlinks:
Home Page - Installing QueueMetrics - Managing agents that dynamically log-on - Installing the Asterisk GUI - QueueMetrics - Compiling Asterisk 1.4 beta - Utenti/Lenz73 - Peering two Asterisk servers using IAX - Script to convert music-on-hold to native formats - Compiling Asterisk 1.2 with TDM400 and H323 - Compiling Asterisk with OH323 - Monitoring Zaptel Hardware - Monitoring multiple Asterisk servers with QueueMetrics - Installing QueueMetrics from scratch - Quick and Dirty Asterisk sound recorder - Configuring a queue - Misc links - Compiling Asterisk 1.4 with TDM400 and H323 - Create an account - Upgrading QueueMetrics licences - Using a HT-488 with Asterisk - Improving AstRecipes - Installing Queuemetrics on Debian - Utenti/walmass - User stats - Licences - Compressing recorded calls to MP3 - UPDATING - asterisk - AstRecipes markup - QueueMetrics logs - Installing Queuemetrics on PBX-in-a-Flash - Add a recipe - Manually updating QueueMetrics - SandBox - Installing the Linksys PAP2-NA port adapter - Installing QueueMetrics on Fonality PBXtra - Connecting to FWD using IAX - Utenti/timlitw - Generic QueueMetrics startup script - Installing QueueMetrics using Yum - Utenti/peter-dean - Compiling Asterisk on EPIA with VIA C3 - Installing XC-AST - Simple queue and agent debug monitoring - Recording all outgoing traffic for some extensions - Optimizing QueueMetrics data access - Connecting to Squillo using SIP - Installing XC-AST under Jetty - Utenti/lostdave
Home Page - Installing QueueMetrics - Managing agents that dynamically log-on - Installing the Asterisk GUI - QueueMetrics - Compiling Asterisk 1.4 beta - Utenti/Lenz73 - Peering two Asterisk servers using IAX - Script to convert music-on-hold to native formats - Compiling Asterisk 1.2 with TDM400 and H323 - Compiling Asterisk with OH323 - Monitoring Zaptel Hardware - Monitoring multiple Asterisk servers with QueueMetrics - Installing QueueMetrics from scratch - Quick and Dirty Asterisk sound recorder - Configuring a queue - Misc links - Compiling Asterisk 1.4 with TDM400 and H323 - Create an account - Upgrading QueueMetrics licences - Using a HT-488 with Asterisk - Improving AstRecipes - Installing Queuemetrics on Debian - Utenti/walmass - User stats - Licences - Compressing recorded calls to MP3 - UPDATING - asterisk - AstRecipes markup - QueueMetrics logs - Installing Queuemetrics on PBX-in-a-Flash - Add a recipe - Manually updating QueueMetrics - SandBox - Installing the Linksys PAP2-NA port adapter - Installing QueueMetrics on Fonality PBXtra - Connecting to FWD using IAX - Utenti/timlitw - Generic QueueMetrics startup script - Installing QueueMetrics using Yum - Utenti/peter-dean - Compiling Asterisk on EPIA with VIA C3 - Installing XC-AST - Simple queue and agent debug monitoring - Recording all outgoing traffic for some extensions - Optimizing QueueMetrics data access - Connecting to Squillo using SIP - Installing XC-AST under Jetty - Utenti/lostdave



