Author Topic: Installing outbound queues for Asterisk on TrixBox  (Read 9967 times)

drbones

  • Guest
Installing outbound queues for Asterisk on TrixBox
« on: March 23, 2007, 18:37:44 »
I don't know if I've got the concept of outbound queues nailed down. Can somebody tell me how I'd go about doing the following?:

I have agents logged into a queue, I'd like to be able to:
1) Get stats on both their incoming and outgoing calls (no problem for incoming at the moment, it works great!)
2) Record all incoming/outgoing calls, gain access to call records based on a custom query.
3) Have all the above happen as seamlessly to the agent as possible.

I've managed to get unattended call monitoring as well as incoming queues configured, but it's unclear from the usermanual if I can perform the same type of thing outbound.

Can somebody provide some insight?

Thanks,
Pat

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2993
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Installing outbound queues for Asterisk on TrixBox
« Reply #1 on: March 25, 2007, 10:04:29 »
Hello,
to track outgoing calls in QM you need to implement an Outtgoing Queue, that is a wrapper that will record the same events for outgoing calls as if they were incoming calls handled by a queue. This is quite easy, as we provide an AGI script that will do all the dirty work for you: see http://queuemetrics.com/faq.jsp#faq-013-queueDial - you just need to change the dialplan to handle this case.
As an added bonus, the example above will use MixMonitor() to record calls on an outgoing queue.
Your agents will the input the outgoing queue to use (so you can have different outgoing campaigns open at once) and the number to dial, and voila it works.

To record all incoming calls, you should set the monitoring again by changing the dial plan as in the example below:

Code: [Select]
[q-my-sample]
; ...queue description.....
exten => s,1,SetVar(MONITOR_FILENAME=/var/spool/asterisk/QSAMPLE-${UNIQUEID})
exten => s,2,Queue(q-sample|nt|||60)

By setting the MONITOR_FILENAME variable, you are implicitly asking Asterisk to record those calls.

tbelanger

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
    • View Profile
Re: Installing outbound queues for Asterisk on TrixBox
« Reply #2 on: April 03, 2007, 13:48:14 »
Hello,
     I currently am monitoring 3 queues:

Team1
Team2
FCS

Members of those queues are pretty much static but they still log on and log off

I would like to be able to monitor all outbound calls from those queues

how would this be setup in both Trixbox and queuemetrics.  Will the above dialplan need to be added to extensions.conf?  What section?
« Last Edit: April 03, 2007, 13:50:42 by tbelanger »

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2993
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Installing outbound queues for Asterisk on TrixBox
« Reply #3 on: April 04, 2007, 16:28:07 »
If the three queueus you refer to in a previous post are inbound queues, whet you should do is create three aliases for outbound queues, so that you will be able in the future to query QM for inbound calls or outbound calls separately.

We usually suggest to create numeric aliases for outbound queues, so if you have an agent who whorks on multiple queues, they can easily input the outbound queue to track the call under using their telephone keyboard.

Imagine your agent sitting at extension 123 wishes to make an outbound call to be logged as outbound activity (i.e. not a personal call) - they would key in 93005555551234 where:
- 9 is the extenal line for outbound queues
- 300 is the outbound queue to log the call under
- 5555551234 is the PSTN number to dial.

As outbound queues are not physical entities but merely a logging convention so that QM can find that data, they do not need being configured anywhere in Asterisk, but just in QueueMetrics. In asterisk you will only have to change the dialplan to run the queueDial.agi file.

I hope this helps.


tbelanger

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
    • View Profile
Re: Installing outbound queues for Asterisk on TrixBox
« Reply #4 on: April 13, 2007, 21:58:32 »
can you give me a sample dialplan for the .agi
I have agi file but don't know where to put it!

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2993
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Installing outbound queues for Asterisk on TrixBox
« Reply #5 on: April 15, 2007, 17:54:27 »
The AGI shall be put in Asterik's AGI directory, usually as /var/lib/asterisk/agi-bin/queueDial.agi - see http://queuemetrics.com/faq.jsp#faq-014-agi for help in having it start.

Then you will use a dialplan like the following....

Code: [Select]
exten => _9XXX.,1,SetVar(MY_QUE=${EXTEN:1:3})
exten => _9XXX.,2,SetVar(MY_NUM=${EXTEN:4})
exten => _9XXX.,3,SetVar(MY_AGENT=${CALLERIDNUM})
exten => _9XXX.,4,NoOp,Ag: ${MY_AGENT} N: ${MY_NUM} Q: ${MY_QUE}
exten => _9XXX.,5,MixMonitor(Q-${MY_QUE}-${UNIQUEID}.wav|b|)
exten => _9XXX.,6,DeadAGI(queueDial.agi|${MY_NUM}|Zap/g0/${MY_NUM}|q-${MY_QUE}|Agent/${MY_AGENT})
exten => _9XXX.,7,Congestion

So that your agents will type 9 123 555555 to dial 555555 on outbound queue q-123. This makes it possible for all agents to use different outbound queues.

Please make sure that the queueDial.agi actually runs, as Asterisk is not very clear on whether it's actually executing it or what :)


anup

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: Installing outbound queues for Asterisk on TrixBox
« Reply #6 on: April 01, 2008, 02:25:11 »
I am using trixbox 2.4 and asterisk version 1.4.16 on it.
The dial plan provided in the document fails. I have debugged and found that the SetVar function fails.
so, I used Set function in the same dial plan and it works fine.

[queuedial]
exten => _XXX.,1,Set(MY_QUE=${EXTEN:0:3})
exten => _XXX.,n,Set(MY_NUM=${EXTEN:3})
exten => _XXX.,n,Set(MY_AGENT=${CALLERID(number)})
exten => _XXX.,n,NoOp,Ag: ${MY_AGENT} N: ${MY_NUM} Q: ${MY_QUE}
exten => _XXX.,n,MixMonitor(Q-${MY_QUE}-${UNIQUEID}.wav|b|)
exten => _XXX.,n,DeadAGI(queueDial.agi|${MY_NUM}|SIP/vitel-outbound/${MY_NUM}|q-${MY_QUE}|Agent/${MY_AGENT})
exten => _XXX.,n,Congestion

I have tested this on dev server and want to confirm from some expert before moving to production server.

-Anup

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2993
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Installing outbound queues for Asterisk on TrixBox
« Reply #7 on: April 01, 2008, 09:47:00 »
Yes some genius decided that SetVar was uncool and Set was cool.