Solved

offer an option while waiting in a queue / exit~re-enter a queue without loosing position

Posted on 2011-03-23
9
1,071 Views
Last Modified: 2013-12-21
here is the dilemma:

we are using the QUEUE application in asterisk 1.8. the diaplan command we use to queue callers is:

exten => s,1,Queue(myQueue,,,,${QMAXWAIT})

the average hold time for callers is about 20 minutes. every 2 minutes, we want to be able to offer an option to press a key to leave a voicemail or continue to wait. so every 2 minutes, the caller in the queue would hear "we are sorry for the delay, you may press 1 to leave a message in our general voicemail, or continue to hold".

this option is available on every single company i know who uses queuing, this GOTTA be doable! :)

one way to achieve this would be to set the timeout of the queue to 2 minutes, and when the call exits from the queue, play the message, wait to see if the caller press 1, and if not, put the caller back in the queue, *but* the caller would loose it's place in the queue !

so i guess the questions are :

1) is there a way to offer this option natively in the asterisk Queue ?
so far i only saw in the options that you can allow caller/callee to press * to hangup, but nothing about defining another key that would run a macro/subroutine while keeping your spot in the queue. also the macro/subroutine options parameters would only run once the call is being picked up by an agent...

2) is there a way once the maximum queue wait time expires and the caller is taken out of the queue, to find out what position the caller was in the queue, so we can re-inject the caller at the same spot after offering the voicemail option ?

any other suggestions welcome !

please answer with a dialplan example.

if you believe that this question requires more points for this question, please ask and I can split this  into multiple questions.

thank you very much in advance for your help!
0
Comment
Question by:NetworkAdmin01
  • 5
  • 3
9 Comments
 
LVL 36

Expert Comment

by:grblades
ID: 35206470
Yes take a look at http://www.voip-info.org/wiki/view/Asterisk+config+queues.conf and search for 'Context' on the page. The feature is not very well documented but if you specify the context and have option 1 going to voicemail that will do the job.
0
 

Author Comment

by:NetworkAdmin01
ID: 35218938
when using the context, the caller can press a DTMF, and it will be sent to the corresponding extension in the context. it seems at the same time, the caller is been taken OUT of the queue.

the queue application has an option to put the caller back in the queue at a particular position, but how do I know the position of the caller in the queue at the time the caller pressed a dtmf to exit the queue; in order to put the caller back to the same position ?

thank you
0
 
LVL 36

Expert Comment

by:grblades
ID: 35219173
You cant do that. You have to have the periodic announcement giving the option for them to press a digit or continue to wait. If they press the digit they should be taken to the voicemail system. You cant put them back in the queue again otherwise they could queue jump or get put back in at the end.
0
 

Author Comment

by:NetworkAdmin01
ID: 35219973
well, that's the thing, i need to be able to process some dialplan code before putting the caller back in the queue: check if agents showed up in another queue to divert there, check/et astDB values, and then ultimately make the decision to go back to the queue, keeping the original position in the queue.

so it all comes down to one question really: how do I know a caller position in the queue as it exits the queue (whether the caller exits because of timeout, or key pressed) ?

thanks a lot
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 36

Expert Comment

by:grblades
ID: 35221522
Asterisk wont do what you want natively.

> the average hold time for callers is about 20 minutes. every 2 minutes, we
> want to be able to offer an option to press a key to leave a voicemail or
> continue to wait. so every 2 minutes, the caller in the queue would hear "we
> are sorry for the delay, you may press 1 to leave a message in our
> general voicemail, or continue to hold".

In this example the caller is never being taken out of the queue. They are just hearing the menu as one of the periodic announcements and they can press 1 at any time to jump to the voicemail. This is exactly how asterisk queues work.

There is no variable set when someone jumps out of a queue as to what position they were in beforehand. You could have a separate program running all the time to issue the 'queue show' command to asterisk and use the output to track all the callers as they go through the system but that wont be easy.

What method are you using to put callers back in the queue at a specific position. The asterisk documentation doesnt list any option which would enable this.
0
 

Author Comment

by:NetworkAdmin01
ID: 35223298
ok, thanks for your help
0
 
LVL 25

Accepted Solution

by:
kode99 earned 500 total points
ID: 35278565
Unfortunately documentation for newer versions of Asterisk is not so common and voip-info.org although good,  is often missing stuff and/or out of date.

They added a 'position' setting to the end of the queue command in 1.8,  not sure if it showed up in 1.6 or not.  The asterisk.org docs for 1.8 are probably the best reference short of looking things up in the source code.

https://wiki.asterisk.org/wiki/display/AST/Application_Queue

You can also find the queue position that somebody left the queue with the channel variable 'QUEUEPOSITION' which is set upon exiting the queue IF you have also set,

setinterfacevar=yes
setqueueentryvar=yes
setqueuevar=yes

in the queue.conf file.  Can't find much documentation on this.  The variable is set when the channel is removed from the queue in the source code for 'app_queue.c'.    Again I'm looking at 1.8 Asterisk source,  this may exist in earlier versions I have not looked.  Probably only need setqueuevar=yes but I did not look that up in the source.

A fairly simple solution may be to use queue priority.  So with your original plan a caller hits the queue timeout and gets the message.  The calls will hit the timeout in the same order they entered the queue and callers who go out and back in will always get a operator before newer calls due to the higher priority.

The priority variable is 'QUEUE_PRIO' and is a integer value.  Calls default to 0 if this is not set.

I'm not sure why you would not use the context set in the queue.conf.  When they 'press 1 to leave a voicemail' isn't think the alternative to waiting in the queue?  This way they can press 1 at any time and get sent to the voicemail.  No fancy dialplan required.  Is the call not going to be ended after a voicemail is left?

As soon as you start pulling people out and putting them back in you will have people jumping position.  While a call is out of the queue somebody else could get the next operator.  This used to be a problem with the periodic message - callers listening to the message would be out of the queue while the message played.



0
 

Author Comment

by:NetworkAdmin01
ID: 35340262
kode: this is PRECISELY the information i was looking for! i can't wait to try this !! thank you!!
0
 

Author Closing Comment

by:NetworkAdmin01
ID: 35340274
wish i had an actual dialplan example with the utilization of the variables. thanks for your help.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

The point of this post is to give you a copy/paste installation solution to setting up Asterisk 1.6 on Ubuntu 9.04 (or similar) server. # Setup the system apt-get install subversion apt-get install make apt-get install linux-source kernel-p…
How To Create Custom / Distinctive Ring Tones on Polycom Phones Purpose and Overview When creating a custom ring tone, you have simple aspirations: to make your phone cooler than everyone else's. Perhaps you need a louder ringer. Perhaps you w…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now