Hello,
I have a new installation of asterisk 1.6 and queuemetrics 1.5.3. I'm having issues with agents being able to login from the agent page. They can login them in and out via the asterisk CLI.
I will paste what I have here so far. Any assistance will be greatly appreciated. This setup is not in production.
This is what I get when I try to login via the agent page
Connected to Asterisk 1.6.1.1 currently running on pbx1 (pid = 3966)
Verbosity is at least 7
== Manager 'admin' logged on from 127.0.0.1
-- Executing [25@queuemetrics:1] Answer("Local/25@queuemetrics-c259;2", "") in new stack
> Channel Local/25@queuemetrics-c259;1 was answered.
-- Executing [10@queuemetrics:1] Answer("Local/25@queuemetrics-c259;1", "") in new stack
-- Executing [10@queuemetrics:2] Wait("Local/25@queuemetrics-c259;1", "10") in new stack
-- Executing [25@queuemetrics:2] NoOp("Local/25@queuemetrics-c259;2", " "QM: AddQueueMember (asterisk v1.4+) Agent/102 on queue 300 made by 'Agent/102'" ") in new stack
-- Executing [25@queuemetrics:3] AddQueueMember("Local/25@queuemetrics-c259;2", "300|Local/102@from-internal") in new stack
-- Executing [25@queuemetrics:4] System("Local/25@queuemetrics-c259;2", " echo "1245709761|$(UNIQUEID}|300|Local/102@from-internal|ADDMEMBER|" >> /var/log/asterisk/queue_log ") in new stack
-- Executing [25@queuemetrics:5] Hangup("Local/25@queuemetrics-c259;2", "") in new stack
== Spawn extension (queuemetrics, 25, 5) exited non-zero on 'Local/25@queuemetrics-c259;2'
== Spawn extension (queuemetrics, 10, 2) exited non-zero on 'Local/25@queuemetrics-c259;1'
== Manager 'admin' logged off from 127.0.0.1
it still says "Agent/102: Agent status cannot be determined "
If I try from the command line, it works.
agents.conf[general]
persistentagents=yes
[agents]
agent => 201,,Ricky Reed
extensions_queuemetrics.conf[root@pbx1 queuemetrics-1.5.3]# cat /etc/asterisk/extensions_queuemetrics.conf
;
; ============================================================================
; The following dialplan context is used by QueueMetrics
; through the manager API.
; - $Id: extensions_queuemetrics.conf,v 1.9 2009/04/09 10:18:39 marcos Exp $
;
; You should modify it to fit your system.
;
; To enable this file, copy it to /etc/asterisk
; and add the line:
; #include extensions_queuemetrics.conf
; by the end of your extensions.conf file.
; ============================================================================
;
[queuemetrics]
; extension 0 is a dummy end point
exten => 10,1,Answer
exten => 10,2,Wait(10)
exten => 10,3,Hangup
; extension 11 makes remote monitoring possible
exten => 11,1,Answer
exten => 11,2,NoOp( "QM_AGENT_CODE: ${QM_AGENT_CODE}" )
exten => 11,3,NoOp( "QM_EXT_MONITOR: ${QM_EXT_MONITOR}" )
exten => 11,4,NoOp( "QM_AGENT_EXT: ${QM_AGENT_EXT}" )
exten => 11,5,NoOp( "QM_LOGIN: ${QM_LOGIN}" )
exten => 11,6,ChanSpy(${QM_AGENT_CODE})
exten => 11,7,Hangup
; extension 12: set call status code
exten => 12,1,Answer
exten => 12,2,NoOp( "QM: Setting call status '${CALLSTATUS}' on call '${CALLID}' for agent '${AGENTCODE}' made by '${QM_LOGIN}'" )
exten => 12,3,System( echo "${EPOCH}|${CALLID}|NONE|Agent/${AGENTCODE}|CALLSTATUS|${CALLSTATUS}" >> /var/log/asterisk/queue_log )
exten => 12,4,Hangup
; extension 14 makes remote monitoring possible for OUTBOUND CALLS
exten => 14,1,Answer
exten => 14,2,NoOp( "QM_AGENT_CODE: ${QM_AGENT_CODE}" )
exten => 14,3,NoOp( "QM_EXT_MONITOR: ${QM_EXT_MONITOR}" )
exten => 14,4,NoOp( "QM_AGENT_EXT: ${QM_AGENT_EXT}" )
exten => 14,5,NoOp( "QM_LOGIN: ${QM_LOGIN}" )
exten => 14,6,ChanSpy(Local/${QM_AGENT_CODE:6}@from-internal)
exten => 14,7,Hangup
; extension 20: agent callback login
; For this to work, there must be no password on the agent.
exten => 20,1,Answer
exten => 20,2,NoOp( "QM: Logging on Agent/${AGENTCODE} to extension ${AGENT_EXT}@from-internal made by '${QM_LOGIN}'" )
exten => 20,3,AgentCallBackLogin(${AGENTCODE}||${AGENT_EXT}@from-internal)
exten => 20,4,Hangup
; extension 21: agent callback logoff
exten => 21,1,Answer
exten => 21,2,NoOp( "QM: Logging off Agent/${AGENTCODE} made by '${QM_LOGIN}'" )
exten => 21,3,System(asterisk -rx "agent logoff Agent/${AGENTCODE}")
exten => 21,4,Hangup
; extension 22: agent pause (with pause code)
exten => 22,1,Answer
exten => 22,2,NoOp( "QM: Pausing Agent/${AGENTCODE} with pause reason '${PAUSEREASON}' made by '${QM_LOGIN}' " )
exten => 22,3,PauseQueueMember(|Agent/${AGENTCODE})
exten => 22,4,System( echo "${EPOCH}|${UNIQUEID}|NONE|Agent/${AGENTCODE}|PAUSEREASON|${PAUSEREASON}" >> /var/log/asterisk/queue_log )
exten => 22,5,Hangup
; extension 23: agent unpause
exten => 23,1,Answer
exten => 23,2,NoOp( "QM: Unpausing Agent/${AGENTCODE} made by '${QM_LOGIN}' " )
exten => 23,3,UnpauseQueueMember(|Agent/${AGENTCODE})
exten => 23,4,Hangup
; extension 24: agent addqueuemember (for asterisk v1.2)
exten => 24,1,Answer
exten => 24,2,NoOp( "QM: AddQueueMember (asterisk v1.2) Agent/${AGENTCODE} on queue ${QUEUENAME} made by '${QM_LOGIN}'" )
exten => 24,3,System( echo "${EPOCH}|${UNIQUEID}|${QUEUENAME}|Local/${AGENTCODE}@from-internal|ADDMEMBER|" >> /var/log/asterisk/queue_log )
exten => 24,4,Hangup
; extension 25: agent addqueuemember (for asterisk v1.4+)
exten => 25,1,Answer
exten => 25,2,NoOp( "QM: AddQueueMember (asterisk v1.4+) Agent/${AGENTCODE} on queue ${QUEUENAME} made by '${QM_LOGIN}'" )
exten => 25,3,AddQueueMember(${QUEUENAME}|Local/${AGENTCODE}@from-internal)
exten => 25,4,System( echo "${EPOCH}|$(UNIQUEID}|${QUEUENAME}|Local/${AGENTCODE}@from-internal|ADDMEMBER|" >> /var/log/asterisk/queue_log )
exten => 25,5,Hangup
; extension 26: agent removequeuemember
exten => 26,1,Answer
exten => 26,2,NoOp( "QM: RemoveQueueMember (asterisk v1.2) Agent/${AGENTCODE} on queue ${QUEUENAME} made by '${QM_LOGIN}'" )
exten => 26,3,System( echo "${EPOCH}|${UNIQUEID}|${QUEUENAME}|Local/${AGENTCODE}@from-internal|REMOVEMEMBER|" >> /var/log/asterisk/queue_log )
exten => 26,4,Hangup
; extension 27: agent removequeuemember (for asterisk v1.4+)
exten => 27,1,Answer
exten => 27,2,NoOp( "QM: RemoveQueueMember (asterisk v1.4+) Agent/${AGENTCODE} on queue ${QUEUENAME} made by '${QM_LOGIN}'" )
exten => 27,3,RemoveQueueMember(${QUEUENAME}|Local/${AGENTCODE}@from-internal)
exten => 27,4,Hangup
; extension 28: agent custom dial
exten => 28,1,Answer
exten => 28,2,NoOp( "QM: Agent Custom Dial. Dialing ${EXTTODIAL} on queue ${OUTQUEUE} made by '${QM_LOGIN}'" )
exten => 28,3,Set(QDIALER_QUEUE=${OUTQUEUE})
exten => 28,4,Set(QDIALER_NUMBER=${EXTTODIAL})
exten => 28,5,Set(QDIALER_AGENT=Agent/${AGENTCODE})
exten => 28,6,Set(QDIALER_CHANNEL=SIP/${QDIALER_NUMBER})
exten => 28,7,Set(QueueName=${QDIALER_QUEUE})
exten => 28,8,MixMonitor(Q-${QDIALER_QUEUE}-${UNIQUEID}.WAV|b|)
exten => 28,9,Goto(qm-queuedial,s,1)
exten => 28,10,Hangup
;
; ================================================================
; The following dialplan is used in order to make oubound calls
; that are tracked through QueueMetrics.
; See
http://forum.queuemetrics.com/index.php?board=12.0; ================================================================
[queuedial]
; this piece of dialplan is just a calling hook into the [qm-queuedial] context that actually does the
; outbound dialing - replace as needed - just fill in the same variables.
exten => _XXX.,1,Set(QDIALER_QUEUE=q-${EXTEN:0:3})
exten => _XXX.,n,Set(QDIALER_NUMBER=${EXTEN:3})
exten => _XXX.,n,Set(QDIALER_AGENT=Agent/${CALLERID(num)})
exten => _XXX.,n,Set(QDIALER_CHANNEL=SIP/${QDIALER_NUMBER})
exten => _XXX.,n,Set(QueueName=${QDIALER_QUEUE})
exten => _XXX.,n,MixMonitor(Q-${QDIALER_QUEUE}-${UNIQUEID}.WAV|b|)
exten => _XXX.,n,Goto(qm-queuedial,s,1)
[queuedial-loggedon]
; This piece of dialplan will let only logged on agents dial out
exten => _XXX.,1,Set(QDIALER_QUEUE=q-${EXTEN:0:3})
exten => _XXX.,n,Set(QDIALER_NUMBER=${EXTEN:3})
exten => _XXX.,n,Set(QDIALER_AGENT=Agent/${AGENTBYCALLERID_${CALLERID(num)}})
exten => _XXX.,n,Set(QDIALER_CHANNEL=SIP/${QDIALER_NUMBER})
exten => _XXX.,n,Set(QueueName=${QDIALER_QUEUE})
exten => _XXX.,n,MixMonitor(Q-${QDIALER_QUEUE}-${UNIQUEID}.WAV|b|)
exten => _XXX.,n,GotoIf($[${LEN(${QDIALER_AGENT})} > 6]?qm-queuedial,s,1)
exten => _XXX.,n,NoOp,Extension ${CALLERID(num)} is not logged on as agent.
exten => _XXX.,n,Playback(agent-loggedoff)
exten => _XXX.,n,Congestion
[qm-queuedial]
; We use a global variable to pass values back from the answer-detect macro.
; STATUS = U unanswered
; = A answered (plus CAUSECOMPLETE=C when callee hung up)
; The 'g' dial parameter must be used in order to track callee disconnecting.
; Note that we'll be using the 'h' hook in any case to do the logging when channels go down.
; We set the CDR(accountcode) for live monitoring by QM.
;
exten => s,1,NoOp,Outbound call -> A:${QDIALER_AGENT} N:${QDIALER_NUMBER} Q:${QDIALER_QUEUE} Ch:${QDIALER_CHANNEL}
exten => s,n,Set(CDR(accountcode)=QDIALAGI)
exten => s,n,Set(ST=${EPOCH})
exten => s,n,Set(GM=QDV-${QDIALER_AGENT})
exten => s,n,Set(GLOBAL(${GM})=U)
exten => s,n,Set(GLOBAL(${GM}ans)=0)
exten => s,n,Macro(queuelog,${ST},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},CALLOUTBOUND,-,${QDIALER_NUMBER})
exten => s,n,Dial(${QDIALER_CHANNEL},30,gM(queuedial-answer^${UNIQUEID}^${GM}^${QDIALER_QUEUE}^${QDIALER_AGENT}^${ST}))
exten => s,n,Set(CAUSECOMPLETE=${IF($["${DIALSTATUS}" = "ANSWER"]?C)})
; Trapping call termination here
exten => h,1,NoOp( "Call exiting: status ${GLOBAL(${GM})} answered at: ${GLOBAL(${GM}ans)} DS: ${DIALSTATUS}" )
exten => h,n,Goto(case-${GLOBAL(${GM})})
exten => h,n,Hangup()
; Call unanswered
exten => h,n(case-U),Set(WT=$[${EPOCH} - ${ST}])
exten => h,n,Macro(queuelog,${EPOCH},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},ABANDON,1,1,${WT})
exten => h,n,Hangup()
; call answered: agent/callee hung
exten => h,n(case-A)i,Set(COMPLETE=${IF($["${CAUSECOMPLETE}" = "C"]?COMPLETECALLER:COMPLETEAGENT)})
exten => h,n,Set(WT=$[${GLOBAL(${GM}ans)} - ${ST}])
exten => h,n,Set(CT=$[${EPOCH} - ${GLOBAL(${GM}ans)}])
exten => h,n,Macro(queuelog,${EPOCH},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},${COMPLETE},${WT},${CT})
exten => h,n,Hangup()
[macro-queuedial-answer]
; Expecting $ARG1: uniqueid of the caller channel
; $ARG2: global variable to store the answer results
; $ARG3: queue name
; $ARG4: agent name
; $ARG5: enterqueue
;
exten => s,1,NoOp("Macro: queuedial-answer UID:${ARG1} GR:${ARG2} Q:${ARG3} A:${ARG4} E:${ARG5}")
exten => s,n,Set(NOW=${EPOCH})
exten => s,n,Set(WD=$[${NOW} - ${ARG5}])
exten => s,n,Macro(queuelog,${NOW},${ARG1},${ARG3},${ARG4},CONNECT,${WD})
exten => s,n,Set(GLOBAL(${ARG2})=A)
exten => s,n,Set(GLOBAL(${ARG2}ans)=${NOW})
exten => s,n,NoOp("Macro queuedial-answer terminating" )
[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})
; --------------------------------------------------------------------
; $Log: extensions_queuemetrics.conf,v $
; Revision 1.9 2009/04/09 10:18:39 marcos
; Added the extension 14 for monitoring outbound calls
;
; Revision 1.8 2009/03/06 11:10:17 marcos
; #620: Custom dial on agent's live page
;
; Revision 1.7 2009/02/16 10:37:47 marcos
; #619: Add AddQueueMember and RemoveQueueMember triggering buttons on agent's live page.
;
; Revision 1.6 2009/02/10 18:17:26 lenz
; Bug #498: CALLOUTBOUND
;
; Revision 1.5 2009/01/12 12:05:47 marcos
; #600 Added QM_LOGIN on all asterisk dialplan calls
;
; Revision 1.4 2008/06/10 16:53:50 lenz
; Aggiunto[queuedial-loggedon] per tutorial outbound 2.0
;
; Revision 1.3 2008/06/07 11:16:58 lenz
; Pure-scripting outbound solution.
;
; Revision 1.2 2007/07/30 15:43:55 lenz
; Bug #173: default compatibili con TrixBox.
;
; Revision 1.1 2007/06/18 13:30:24 lenz
; Prima versione.
;
;
;
extensions_custom.conf#include extensions_queuemetrics.conf
[from-internal-custom]