Author Topic: contrib.: Asterisk 1.4+ AEL queumetrics-extensions.ael  (Read 5202 times)

Wessel

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
    • View Profile
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) context
Change 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 ----------------------------
Quote
//                           
//   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;
  }
}
« Last Edit: May 03, 2008, 13:26:48 by Wessel »

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: contrib.: Asterisk 1.4+ AEL queumetrics-extensions.ael
« Reply #1 on: May 04, 2008, 12:20:27 »
Yes we'll do.
Thanks for contribuiting it!

Wessel

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
    • View Profile
Re: contrib.: Asterisk 1.4+ AEL queumetrics-extensions.ael
« Reply #2 on: June 13, 2008, 21:50:13 »
I've been running this now for some time. Didn't find any errors or flaws. Anybody else tried this AEL script for QM ?

Wessel

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: contrib.: Asterisk 1.4+ AEL queumetrics-extensions.ael
« Reply #3 on: August 07, 2008, 15:57:45 »
I confirm this has been added to 1.4.5