How does Queue Toggle module work?

I have tried *45 and it always seems to say Agent logged in, but when I do ‘queues show’ in asterisk there are no agents logged in. I have also tried 45extensionQueue, but still just says agent logged in, and does nothing.

What is the proper usage for this module? and can it be used with agents.conf?

45 is not working for me either even though I get a busy lamp. For now I’m using queue to login and queue** to logout…automated a bit with EFKs on my polycom.

  1. You need devstate
  2. you need to add QUEDEVSTATE=yes in amportal conf.

format for the buttons is 45{exten}{Queue}

check your hints and make sure that they are being created. If they are not then you either don’t have devstate or quedevstate running.

Dave

I modified amportal.conf as you suggested but the issue still exists. BLFs are working for other things such as DND.

Entering 45{exten}{Queue} from a handset logs an agent into the queue but omits the extension number. If I dial *45 from the handset it works fine but a hint is not registered.

I will try and submit a bug and patch via the tracker, But it appears that Phillipe may have updated the code moving into 2.6 and the var he has used to get the extension number (AMPUSER) is not returning the extension number, hence no hint registering, when I wrote the code I used the var REALCALLERID, and that seems to work.

I should have some time over the next day or two to get this sorted out.

Dave

Thanks

I’ve also noticed that the agi itself is failing (in a 1.4 install with devstate, and freepbx 2.6). On my system AMPUSER does contain the proper value, but the agent still doesn’t get logged in etc.


Notice: Use of undefined constant QUEUENO - assumed ‘QUEUENO’ in /var/lib/asterisk/agi-bin/queue_devstate.agi on line 46

Notice: Undefined offset: 0 in /var/lib/asterisk/agi-bin/queue_devstate.agi on line 94

Notice: Undefined offset: 0 in /var/lib/asterisk/agi-bin/queue_devstate.agi on line 83

Can Queue Toggle be installed an a 2.5 system?

Bill/W5WAF

It Can, but it is not supported.
If you have a look in tracker, you will find a some patch files and the agi that does the magic.

lostdave, does that work without the bug that we’re seeing above?

Thanks for looking into it by the way. We all appreciate your contribution!

No Bug in the tracker Files…

That version uses the realcallerid var in the modules/queues/functions.inc.php

If you check around line 750 of the patch http://www.freepbx.org/trac/attachment/ticket/3044/queue-hints-v2.patch

Dave

OK. I upgraded to 2.6, but couldn’t get Queue Toggle to work. Same issues as other folks are describing. I noted QUEDEVSTATE=yes, but DEVSTATE=true, should QUEDEVSTATE=true be the proper syntax?

Bill/W5WAF

Our Asterisk support vendor (http://www.anteil.com) found a work around for this issue.

Edit /var/www/html/admin/modules/queues/features.php.inc

There are two macros in need of editing, function queue_agent_add_toggle and function queue_agent_del_toggle.

Replace AMPUSER with REALCALLERIDNUM in each of those sections

Do an amportal restart

Enjoy and remember that upgrades will break this again, unless of course the upgrade itself is designed to address it

Thanks ffenton - Anteil is very glad to be your Asterisk and FreePBX support vendor.

To be clear, I figured out this workaround from lostdave’s reference to a patch for 2.5 in the bug tracker and his comment about the changes that Phillipe may have applied to include it in 2.6.

I also wanted to point out that restarting FreePBX (amportal restart) won’t actually apply the change. You actually need to apply a change in FreePBX after patching the functions in features.php.inc, then click the orange bar to apply.

You can also run /var/lib/asterisk/bin/retrieve_conf and then reload Asterisk if you prefer.

ffenton, the solution that your support vendor found out is not correct.
There was a bug in the code that was fixed in r8422 and in r8456.
It was actually a spelling error, AMPUSER was spelled AMPUSUER and that was the cause of the toggle not to function.

Queue modules was updated and published as 2.6.0.3 about a month ago.

Mikael,

Thanks for keying in on this thread. We all appreciate your contribution to the community - yours and the rest of the dev team. Thanks guys!

Regarding this issue, as ffenton’s support vendor - last week when he installed Asterisk Now 1.5, and then updated FreePBX to the latest version, the queue toggle did not work. I verified the issue on a seperate, Asterisk-compiled-from-source system on a different distro. The queue toggle from the latest Queue module (2 weeks ago) did not work.

Specifically, with the functions using AMPUSER, it would enroll queue members as “Local/@from-queue/n”* - again, this was the latest version. I understand that there had been a typo, but even with the typo fixed, the toggle wasn’t working. Of course, with AMPUSER replaced by REALCALLERIDNUM, the toggle worked properly.

I don’t see it as the permanent “fix” (obviously) but it was a quick fix that we effective.

Andy

*edited from “from-internal” to correct a mistype 2010-01-31

OK, so I was forced to actually test this and here are my results:

Extension is 2476, queue is 2499
First I added USEDEVSTAT=true in amportal.conf
Note the syntax, USEDEVSTATE=true!

Then I re-saved my queue so that the setting would be read in.
I then checked Asterisk settings to see what have changed:
show globals, QUEDEVSTATE=TRUE was set, that was good

I checked that I have the function devstate loaded

pbx*CLI> module show like func_devstate.so
Module                         Description                              Use Count
func_devstate.so               Gets or sets a device state in the dialp 0
1 modules loaded

That was ok.
Note, you need to have Asterisk 1.6 or a backported func_devstate in Asterisk 1.4.

show hints

*452476*[email protected] : Custom:QUEUE2476*249 State:Unavailable Watchers 0

That was good

queue show:

2499         has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime), W:0, C:0, A:0, SL:0.0% within 0s
   Members:
      Local/[email protected]/n (Not in use) has taken no calls yet
   No Callers

Only one static agent, that was ok

I then dialed 4524762499 I got back voice “Agent logged in” or something like that.

I then checked my queue

2499         has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime), W:0, C:0, A:0, SL:0.0% within 0s
   Members:
      Local/[email protected]/n (Not in use) has taken no calls yet
      Local/[email protected]/n (dynamic) (Not in use) has taken no calls yet
   No Callers

I am a little confused about that you get @from-internal when you enroll agents into the queue. That is not right. What version of FreePBX do you use and what version of Queue module?

You know, its strange. I start to type a context and from-internal just comes out. It was

Local/@from-queue/n (but you’ll note there was no extension preceding the @ sign - the point of the example.) - I’ve amended the post above to show the mistake.

So - I went back to test myself. Lo and behold, we were/are running Queue module 2.6.0.2 on that machine. I ran the test - confirmed that it failed

Local/@from-queue/n (dynamic) (Invalid) has taken no calls yet

and checked for updates, where it appears the actual problem lies.

Queues 2.6.0.2 FreePBX Enabled and up to date

Note, the upgrade to 2.6.0.3 doesn’t appear available? This is our problem. The material above from lostdave threw me off the scent of the real problem - the typo - clear as day in both functions in 2.6.0.2.

ffenton - instead of REALCALLERIDNUM, you CAN use AMPUSER - it just needs to be changed from AMPUSUER. Eventually 2.6.0.3 will become available to us, at which point this problem will be fixed.

Mikael - thank you for your help. Do you have any idea why Queues 2.6.0.3 might not be showing up in our modules list as upgradable?

Andy

If you get Invalid in your queue for Local channels you need to add two lines in your modules.conf:

; As FreePBX is using Local as the channel for queue members we need to make sure
; that pbx_config.so and chan_local.so are preloaded. If not, queue members
; will be marked as invalid until app_queue is reloaded.
preload => pbx_config.so
preload => chan_local.so

I am looking into why the 2.6.0.3 module is not showing up in Online update.

Thanks!