Queues: Skip Busy Agents, call-limit or ringinuse

I’m no queue expert here but it should be possible to add it to a given specific queue context in the same manner as you can add additional options to a given sip context. See the notes under sip_custom_post.conf on how to do it.

If you confirm that it does work please let me know and I’ll update that page to reflect it using this specific example so others can find it in the future.

So, for anybody that want to add the atribute ringinuse=no to any queue in a manual manner, you can do the following

Create your queue, in my case with “skip busy agents” atribute was still sending calls to members when you where placing people on hold.

Then edit the file queues_post_custom.conf and add:

"

2
ringinuse=no

"

without the quotes obviously, and of course with the queue name instead of “2”.

reload inside of the CLI and test

The report at http://www.freepbx.org/trac/ticket/2768 was not merged into FreePBX.
If you want it you can add it manually.

In admin/modules/queues/functions.inc.php, right before:

    if ($_REQUEST['music'] != 'inherit') {
            $fields[] = array($account,'music',($_REQUEST['music'])?$_REQUES

T[‘music’]:‘default’,0);
}

add:

            $fields[] = array($account,'ringinuse',($_REQUEST['cwignore'])?'

no’:‘yes’,0);

ringinuse option in pre-1.4 has no effect.

Tadpole, is this:

$fields[] = array($account,‘ringinuse’,($_REQUEST[‘cwignore’])?‘no’:‘yes’,0);

Has to be added in additon to the code in http://www.freepbx.org/trac/ticket/2768 ??

Or this replaces the code in the ticket.

two more questions…

Adding this code will add a field in the QUEUES section in freepbx? if not… will ringinuse=no will be valid for all queues?

Do I have to start apache, amp, asterisk or anything else in order for this to take effect?

Thanks

If queues_post_custom.conf works for you then I would avoid touching the FreePBX code.

Anyway, the line you should add is just like the one on Trac except for “if (version_compare($version, “1.4”, “ge”))” which doesn’t hurt to leave out.

This single line will add ringinuse in queues_additional.conf. It will be =no when Skip Busy Agents is Yes, and =yes if Skip Busy Agents is No (for each queue defined in FreePBX).

After adding this line, just modify a queue from the freepbx gui, submit and reload with the red bar. Then take a look at queues_additional.conf.

Anyway, if queues_post_custom.conf does the job for you then why bother…

Tadpole, thanks for your information. Eventhough the questions I asked you were not to fix the issue because it was already fixed… your answers helped me a lot understanding what I was doing and I am sure that this will help me with other future issues.

Thank you!

Thanks for posting that it works I’ll update the notes on that page to include this.

Ok, it didn’t work… when I make changes and reload frepbx I check queues_additional.conf and there is no ringinuse=no. It works because of the “post” file but tweeking the php did not work…

Maybe I am doing something wrong, I am not proficient on php

here’s what i added, with some lines before and some after…
"

    array($account,'weight',(isset($_REQUEST['weight']))?$_REQUEST['weight']:'0',0),
    array($account,'autofill',(isset($_REQUEST['autofill']))?'yes':'no',0),

);

$fields[] = array($account,‘ringinuse’,($_REQUEST[‘cwignore’])?‘no’:‘yes’,0);

    if ($_REQUEST['music'] != 'inherit') {
            $fields[] = array($account,'music',($_REQUEST['music'])?$_REQUEST['music']:'default',0);
    }

"

Thanks.

The code in the above Trac ticket was valid for FreePBX 2.4. For 2.5, you also need to add the following in “function generate_queues_additional”:

case ‘ringinuse’:
$output .= $keyword."=".$data."\n";
break;

in the “else” condition of “if ($ver12)” within the loop “foreach ($results2 as $keyword => $data)”. That is, run “$output .= $keyword.”=".$data."\n";" for Asterisk versions superior to 1.2.

(see http://www.freepbx.org/trac/ticket/3546)

Using Ringoncall=no works, but now i have a problem…

Sometimes the phones don’t refresh their status from “in use” to “not in use” when they hang up.
Since their status does not go to “not in use” that phone stop being available for the queue to send phones to that endpoint (agian, I am using polycoms)

Any ideas?

The “in use” status stays there when the user transfers the call to another internal extension. And the agent does not change its status to “not in use” until the call that he transfered gets disconnected. Obviously this is not the desired behaiviour.

Any ideas?

I’m trying to setup a queue, but have trouble with calls when agents are busy.
Ring strategy is ringall.

Extensions have call waiting disabled. When a call comes in, and an agent is occupied (others ring normally). Then this agent is free again, but is not ringing.

Max Wait Time: 1min 30s
Join empty: Yes
Agent timeout: 20s
Retry: 1s
Skip busy agents: No

Shouldn’t the extension ring after 1 sec after it gets free?

Wrong setup or bug?

FreePBX 2.5.2.2
Asterisk 1.4.22

Thank you

Following reports from several Asterisk users that they’re having
problems with ringinuse=no not working when Local Channels are used to
provide hot-desking support within the Asterisk Queue() function, we
have developed a very easy fix for this that is now documented in our
popular Asterisk Queues Tutorial.

You don’t need to do anything fancy with STATEINTERFACE to get this to
work, and it also works with all Asterisk phone types, including SIP and
DAHDI channels.

For further details please see:<a href="http://www.orderlyq.com/asteriskqueuesLocal.html#ringinuse>http://www.orderlyq.com/asteriskqueuesLocal.html#ringinuse</ a>
So, if you’re struggling with this, perhaps as a result of abandoning
the now-deprecated Agent Channel mechanism, you might want to take a look :slight_smile:

Thanks for reading!