Hi,
Here's a translation of the old Asterisk extensions_queuemetrics.conf into the new Asterisk 1.4+ AEL language. Useful for people who are setting up a new call center based on asterisk 1.4+ and the new AEL language to describe their dial plan.
For more information about this extensions please read the manual (1.4.1)
Appendix III: The (queuemetrics) contextChange the bold context into your own context if needed (recommended to leave though and fix your own dial plan
)
QM could you please add this to the distribution?
Thanks,
Wessel de Roode
---------extensions_queuemetrics.ael ----------------------------
//
// QueueMetrics Extensions
//
// Based on the old queuemetrics/WEB-INF/mysql-utils/extensions-examples/extensions_queuemetrics.conf
//
context queuemetrics
{
// extension 0 is a dummy end point
10 => {
Answer;
Wait(10);
Hangup;
}
// extension 11 makes remote monitoring possible
11 => {
Answer;
NoOp( "QM_AGENT_CODE: ${QM_AGENT_CODE}" );
NoOp( "QM_EXT_MONITOR: ${QM_EXT_MONITOR}" );
NoOp( "QM_AGENT_EXT: ${QM_AGENT_EXT}" );
ChanSpy(${QM_AGENT_CODE});
Hangup;
}
// extension 12: set call status code
12 => {
Answer;
NoOp( "QM: Setting call status '${CALLSTATUS}' on call '${CALLID}' for agent '${AGENTCODE}'" );
System( echo "${EPOCH}|${CALLID}|NONE|Agent/${AGENTCODE}|CALLSTATUS|${CALLSTATUS}" >> /var/log/asterisk/queue_log );
Hangup;
}
// extension 20: agent callback login
// For this to work, there must be no password on the agent.
20 => {
Answer;
NoOp( "QM: Logging on Agent/${AGENTCODE} to extension ${AGENT_EXT}@from-internal" );
AgentCallBackLogin(${AGENTCODE}||${AGENT_EXT}@from-internal);
Hangup;
}
// extension 21: agent callback logoff
21 => {
Answer;
NoOp( "QM: Logging off Agent/${AGENTCODE}" );
System(asterisk -rx "agent logoff Agent/${AGENTCODE}");
Hangup;
}
// extension 22: agent pause (with pause code)
22 => {
Answer;
NoOp( "QM: Pausing Agent/${AGENTCODE} with pause reason '${PAUSEREASON}' " );
PauseQueueMember(|Agent/${AGENTCODE});
System( echo "${EPOCH}|${UNIQUEID}|NONE|Agent/${AGENTCODE}|PAUSEREASON|${PAUSEREASON}" >> /var/log/asterisk/queue_log);
Hangup;
}
// extension 23: agent unpause
23 => {
Answer;
NoOp( "QM: Unpausing Agent/${AGENTCODE} " );
UnpauseQueueMember(|Agent/${AGENTCODE});
Hangup;
}
}