Route to IVR when all agents in queue are busy?

Hi guys,
I’m looking for a solution for this problem:

If all agents on a queue are ‘busy’, the calls shall go to IVR.
I tried to use the ‘Join Empty’ function, but the agents are not unavaible, they are just ‘busy’!

Thanks for your help!

Leiste

Hi Philippe,
thanks for your answer.
I’m running Asterisk 1.6.2.17.2 with FreePBX 2.7. (Asterisk NOW!)
Should I update to FreePBX 2.8 and Asterisk 1.8? Is this constellation running fine?

Should I use this upgrade path?
http://www.freepbx.org/support/documentation/howtos/how-to-upgrade-asterisk

Leiste

2.8 would allow you to use the device information, you might want to start with that and you can just use the version upgrade module to do that.

2.9 + 1.8 will get you a lot more, it’s a release candidate now though I’m about to make it final. It’s got about 3000 users on it atm. You will have to decide your tolerance for ‘newness’ in your specific situation.

By the way:
busylevel and calllevel of the user are ‘1’

8000
busylevel = 1
call-limit = 1

you need to make sure you are running with a late enough version of FreePBX and Asterisk such that the agent status can be associated with their device state, or even better, with their hint state which either requires a patch to 1.4, or using 1.8 where the hint patch finally got incorporated (no options for 1.6).

Otherwise, the device state information will get most of the way there starting around 1.4.25 but iirc, we don’t do anything with that until FreePBX 2.8.

All and all, for queue stuff, FreePBX 2.9 is best and assuming Asterisk 1.8 meets the needs, that would also be the best bet with it’s support for the hints.

That seems to be my problem:

[Apr 4 18:20:34] DEBUG[2505] app_queue.c: NO QUEUE_PRIO variable found. Using default.
[Apr 4 18:20:34] DEBUG[2505] app_queue.c: queue: 7000, options: t, url: , announce: , expires: 0, priority: 0
[Apr 4 18:20:34] DEBUG[2505] app_queue.c: Queue 7000 has no realtime members defined. No need for update
[Apr 4 18:20:34] DEBUG[2505] app_queue.c: Local/[email protected]/n is available.
[Apr 4 18:20:34] DEBUG[2505] app_queue.c: Queue ‘7000’ Join, Channel ‘SIP/SIP_Trunk_Alcatel-00000017’, Position ‘1’
[Apr 4 18:20:34] VERBOSE[2505] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/SIP_Trunk_Alcatel-00000017
[Apr 4 18:20:34] DEBUG[2505] channel.c: Scheduling timer at (50 requested / 50 actual) timer ticks per second
[Apr 4 18:20:34] DEBUG[2505] app_queue.c: There is 1 available member.
[Apr 4 18:20:34] DEBUG[2505] app_queue.c: It’s our turn (SIP/SIP_Trunk_Alcatel-00000017).
[Apr 4 18:20:34] DEBUG[2505] app_queue.c: SIP/SIP_Trunk_Alcatel-00000017 is trying to call a queue member.
[Apr 4 18:20:34] DEBUG[2505] app_queue.c: (Parallel) Trying ‘Local/[email protected]/n’ with metric 0


The Asterisk seems to think, that the agent is available.
After putting the calle in queue, the queue starts to try to put the call to the agent and then, and not before, asterisk recognizes that the Agent is ‘busy’

Why at this point and not before?

And now I got the answer…

szenario1:
Agent is talking to somebody, call was initiated by the agent.
For the queue, the agent is not busy and so asterisk puts a new caller to the queue.

szenario2:
Agent gets a call from the queue and is talking to the caller.
New callers are not put in the queue, because the agent is ‘busy with a queue call’.

So szenario two is working fine.
But from my understanding, I thought that everytime the agent is ‘busy’ (from queue or not from queue) calls are not getting in the queue.

Has anybody an idea to solve that ‘issue’

Leiste

Hi,
skipping is no longer the problem.
[Apr 4 17:56:44] VERBOSE[1743] config.c: == Parsing ‘/etc/asterisk/queues.conf’: [Apr 4 17:56:44] VERBOSE[1743] config.c: == Found
[Apr 4 17:56:44] VERBOSE[1743] config.c: == Parsing ‘/etc/asterisk/queues_general_additional.conf’: [Apr 4 17:56:44] VERBOSE[1743] config.c: == Found
[Apr 4 17:56:44] VERBOSE[1743] config.c: == Parsing ‘/etc/asterisk/queues_custom_general.conf’: [Apr 4 17:56:44] VERBOSE[1743] config.c: == Found
[Apr 4 17:56:44] VERBOSE[1743] config.c: == Parsing ‘/etc/asterisk/queues_custom.conf’: [Apr 4 17:56:44] VERBOSE[1743] config.c: == Found
[Apr 4 17:56:44] VERBOSE[1743] config.c: == Parsing ‘/etc/asterisk/queues_additional.conf’: [Apr 4 17:56:44] VERBOSE[1743] config.c: == Found
[Apr 4 17:56:44] VERBOSE[1743] config.c: == Parsing ‘/etc/asterisk/queues_post_custom.conf’: [Apr 4 17:56:44] VERBOSE[1743] config.c: == Found
[Apr 4 17:56:44] VERBOSE[1743] pbx.c: – Registered extension context ‘app_queue_gosub_virtual_context’ (0x1fc70c60) in table 0x2aaaac000f50; registrar: app_queue
[Apr 4 17:56:44] VERBOSE[1743] pbx.c: – Added extension ‘s’ priority 1 to app_queue_gosub_virtual_context (0x1fc70c60)
[Apr 4 17:56:44] NOTICE[1743] app_queue.c: Queue members successfully reloaded from database.

But I’m still able to join a queue where every Agent is speaking.

So the problem is still there…

Hey,
thanks for the tip with ‘junk’ - I just didn’t get that idea :wink:
My problem seems to be, that the (+) is not working:


[Apr 4 17:32:35] VERBOSE[444] config.c: == Parsing ‘/etc/asterisk/queues.conf’: [Apr 4 17:32:35] VERBOSE[444] config.c: == Found
[Apr 4 17:32:35] VERBOSE[444] config.c: == Parsing ‘/etc/asterisk/queues_general_additional.conf’: [Apr 4 17:32:35] VERBOSE[444] config.c: == Found
[Apr 4 17:32:35] VERBOSE[444] config.c: == Parsing ‘/etc/asterisk/queues_custom_general.conf’: [Apr 4 17:32:35] VERBOSE[444] config.c: == Found
[Apr 4 17:32:35] VERBOSE[444] config.c: == Parsing ‘/etc/asterisk/queues_custom.conf’: [Apr 4 17:32:35] VERBOSE[444] config.c: == Found
[Apr 4 17:32:35] VERBOSE[444] config.c: == Parsing ‘/etc/asterisk/queues_additional.conf’: [Apr 4 17:32:35] VERBOSE[444] config.c: == Found
[Apr 4 17:32:35] VERBOSE[444] config.c: == Parsing ‘/etc/asterisk/queues_post_custom.conf’: [Apr 4 17:32:35] VERBOSE[444] config.c: == Found
[Apr 4 17:32:35] WARNING[444] app_queue.c: Queue ‘7000’ already defined! Skipping!
[Apr 4 17:32:35] VERBOSE[444] pbx.c: – Registered extension context ‘app_queue_gosub_virtual_context’ (0x2aaaac0c6f30) in table 0x139e3d80; registrar: app_queue
[Apr 4 17:32:35] VERBOSE[444] pbx.c: – Added extension ‘s’ priority 1 to app_queue_gosub_virtual_context (0x2aaaac0c6f30)
[Apr 4 17:32:35] NOTICE[444] app_queue.c: Queue members successfully reloaded from database.


Asterisk seems to skip my additional setting in the ‘queues_post_custom.conf’?
Any ideas?

Leiste

Asterisk only logs information when parsing the file and encountering an incorrect setting, no feedback when parsing a correct setting.

I had earlier added your setting in the 7000 syntax and added ‘junk’ along with the rest. It complains about ‘junk’ but not the others. Thus, it looks like it is parsing and setting those settings. (But if you put the 7000 first it complains and never gets to the next.

As far as other feedback, if you crank up debugging maybe when entering the queue Asterisk may spit something out, you would have to do some testing.

Hi,
the idea with the ‘-’ was from ‘http://www.freepbx.org/configuration_files’.
I can’t switch the ‘joinempty’ function to ‘off’.
If I create a queue with the gui, the ‘joinempty’ parameter is automatically set in the config.
Unfortunately it also doesn’t work, when I use only the 7000 line.
Is there a possibility to see, which lines the asterisk uses? Some kind of log from loading the configs or something like that?

Do you have another idear for me?

Thanks,

Leiste

I would try setting it off in the GUI and skip the 7000 line as I don’t think that is correct syntax and will probably make the rest of the file get skipped.

(though the GUI settings probably doesn’t matter as I believe this will override what ever you have in the GUI completely)

Hi,
with Asterisk 1.6.2 this feature was applied:

2008-10-06 15:29 +0000 [r146640] Mark Michelson [email protected]

* configs/queues.conf.sample, CHANGES, apps/app_queue.c: This
  commit introduces a change to how the "joinempty" and
  "leavewhenempty" options are configured in queues.conf. Instead
  of using vague terms like "yes," "no," "loose," and "strict," we
  now accept a comma-separated list of values to determine when to
  consider a member available.

In queues_additional.conf my queue 7000 has the option 'joinempty=strict’
I tried to add the feature by adding this lines in the queues_post_customer.conf:

7000
joinempty=strict

7000
joinempty=paused,inuse,ringing,invalid,penalty,unavailable,unknown,wrapup

Unfortunately this doesn’t work.
Is that the right way to use queues_post_customer.conf?

Thanks for your answer.

Leiste

what version of Asterisk?

Reading through the docs, it looks like we may have to update FreePBX (starting at least with 1.6.2, maybe earlier, I don’t have that branch loaded right now).

Stict is equivalent to:

; strict - penalty,paused,invalid,unavailable

where as you need to add ‘inuse’ and possibly ‘ringing’ to that list. You can try manually updating queues_additional.conf to test and see if replacing strict with the proper string does the trick (pretty sure 1.4 doesn’t support any of this), but that will get overwritten once you reload so we’ll have to update FreePBX to handle the new scenarios.

Hi,
I’m running a Asterisk 1.6.2.16.1 with FreePBX 2.7.0.8!
I’ll try your tipp and will report what happens!

Leiste

Hi,
I just tried it with a ring group…that works fine.
But I’d like to get it working with a queue - so if you have any ideas…it would be great!

Leiste

Hi!
Yes I tried ‘Strict’, but unfortunately it doesn’t work.
I had a closer look to the description:

; There are three choices:
;
; yes - callers can join a queue with no members or only unavailable members
; no - callers cannot join a queue with no members
; strict - callers cannot join a queue with no members or only unavailable members
; loose - same as strict, but paused queue members do not count as unavailable
;
; joinempty = yes

Cause I’m from Germany, I’m not sure: What does unavailable mean in this context? It is not the same like busy, right?
When I have a look at the queue via the CLI, I see that the Agent, which is already speaking to a caller is in the status ‘in use’.
Looking at the CLI, when the second caller is calling, I see that the queue accepts the caller which should not be able to join the queue. The queue is trying to put the caller through to the busy agent (there is only one dynamic agent, nos static), but gets the answer, that the agent is busy. After some seconds the queue tries again putting the new caller through…

Thanks for your answer!

Leiste

did you try ‘Strict’ for your option that is what it is suppose to do.