TB 2.8 / Queues / Ring strategies / static agents do not ring
Hi all,
I saw a similar problem here (http://www.trixbox.org/forums/trixbox-forums/help/trixbox-28-queu...) but not quite the same so I am opening a new thread.
I have a TB2.8 which, after the last update (on 18/9/09) seems to have its queues ring strategy broken.
I have two queues with 3 static agents each with fewestcalls and roundrobin strategies. They are used as destinations by the IVR. This has been working without problems for years and through many tb versions up to now.
I have now noticed that when one calls into a queue they are taken to music on hold and the script stops there. The caller listens to music indefinitely. The static agents do not ring. If enabled, the caller hears to the 'no agent available' message at some point.
The only way I have found to make my queues work again is to only use the ringall strategy. This way the script proceeds to call dialparties.agi etc. and the agents' phones ring.
Any ideas on how to get this fixed?
TIA
bump...
Continuing my rambling, I have seen that when I call a queue and hear its moh (or ringing), the 'queue show' cli command shows:
400 has 1 calls (max unlimited) in 'fewestcalls' strategy (0s holdtime), W:0, C:0, A:1, SL:0.0% within 0s
Members:
Local/299@from-internal/n (Not in use) has taken no calls yet with total talktime 0s
Local/207@from-internal/n (Not in use) has taken no calls yet with total talktime 0s
Callers:
1. SIP/202-b6d50c70 (wait: 0:13, prio: 0)
None of the agents is ringing.
Also, I tried it with dynamic agents and the result was the same.
2nd bump
(sorry but still need help with this)
Same issue here. Callers get MOH and no phones either static or dynamic agents ring. Just get MOH until caller hangs up. Lost....
I tried the new 1.6.0.10 rev.13 release but without any success. The queue agents still do not ring except if the queue is set with the ringall strategy.
I am pasting here the queue status when idle:
trixbox*CLI> queue show 400
400 has 0 calls (max unlimited) in 'fewestcalls' strategy (0s holdtime), W:0, C:0, A:3, SL:0.0% within 0s
Members:
Local/299@from-internal/n (Not in use) has taken no calls yet with total talktime 0s
Local/207@from-internal/n (Not in use) has taken no calls yet with total talktime 0s
No Callers
and here is the queue status when ringing, moh plays, no phones ring:
trixbox*CLI> queue show 400
400 has 1 calls (max unlimited) in 'fewestcalls' strategy (0s holdtime), W:0, C:0, A:2, SL:0.0% within 0s
Members:
Local/299@from-internal/n (Not in use) has taken no calls yet with total talktime 0s
Local/207@from-internal/n (Not in use) has taken no calls yet with total talktime 0s
Callers:
1. SIP/202-b65cb268 (wait: 0:02, prio: 0)
Hi!
I think this is a problem in the new versions with the order of loading the modules.
If I reload the queue module in the CLI it works. As google told me, that if the queue module laods before the channel modules the agents are "Not in use"
I changed my modules.conf and added the following line as last entry in the [Modules] section:
load => app_queue.so
Now it works.
Regards,
Bernd
Hi,
Thank you for your reply.
I tried your suggestions but without success.
I (both) reloaded and unloaded+loaded the module and also changed the modules.conf. The effect is the same.
I will also post on the bugtraker as instructed.
A new install of 2.8.0.1 has failed to be able to provide queue functionality for me also.
Is this problem in the trixbox offshoot of freepbx. Would installing proper freepbx fix this. How might this be achieved on a configured system?
Same here, except we use dynamic agents, and normally either 'roundrobin', 'rrmemory', or 'leastrecent' strategies. Whats happening with us though is that no matter what the 'ring strategy' is set to, ALL logged in agents get called SIMULTANEOUSLY. I can post some asterisk logs possibly, trying to make sense of them now.... / Almost looks like whatever is handling queue events (I dont see the 'DEBUG' lines anymore with output from app_queue like in 2.6.2.2) is disregarding the ring strategy, but I don't know.
Same issue here on a brand new TB install. I've tried with:
preload => chan_local.so
preload => pbx_config.so
and
load => app_queue.so
in modules.conf with no luck (actually the preloads fixed the invalid user you got when running queue show - it now displays Not in use instead for each member)
Can anyone shed some light on this? Would using the 1.4.x asterisk branch fix it? Are you all using 1.6.x?
I can confirm that we have the same issue here.
Trixbox 2.8.0.1, Asterisk 1.6.0.10-FONCORE-r40.
The only ring strategy which works with static agents is Ringall. Would that be by design (not implemented) or a genuine bug? Did anyone tried with any original Asterisk software?
Same here
Just updated my test box with yum update.
I now run asterisk 1.6.0.10-FONCORE-r40 (as reported by asterisk -r) or asterisk 1.4.22-4 as reported by yum.
Still the same is happening.
Yiannos
http://www.readiness.gr
From 2.8.0.1 we did a full yum -y update, and now the queues do not work. I have a whole sales pool dead in the water. What gives?!?!?
This appears to be the same issue as shown above. The tail -f /var/log/asterisk/full shows the following:
...
[Dec 10 03:34:51] VERBOSE[11467] logger.c: -- Executing [404@ext-queues:9] Queue("SIP/xxxxx-yyyyyyyy", "404,tr,,custom/SalesQueueMsg,90") in new stack
[Dec 10 03:34:51] NOTICE[11467] app_queue.c: No one is answering queue '404' (10/0/0)
[Dec 10 03:34:55] VERBOSE[11467] logger.c: -- Hold time for 404 is 0 minute(s) 0 seconds
[Dec 10 03:34:55] NOTICE[11467] app_queue.c: No one is answering queue '404' (10/0/0)
[Dec 10 03:34:59] NOTICE[11467] app_queue.c: No one is answering queue '404' (10/0/0)
[Dec 10 03:35:03] NOTICE[11467] app_queue.c: No one is answering queue '404' (10/0/0)
[Dec 10 03:35:07] NOTICE[11467] app_queue.c: No one is answering queue '404' (10/0/0)
[Dec 10 03:35:11] NOTICE[11467] app_queue.c: No one is answering queue '404' (10/0/0)
If there is a live bug in the queues, can someone acknowledge this? Or at least explain where the conflict is?
Is this bug relevant? https://issues.asterisk.org/view.php?id=2574
Or perhaps this bug? https://issues.asterisk.org/view.php?id=16391
And here is yet more info. It seems the db.c is not finding a key. Not sure what this means, but the res_config_mysql fails to connect to the realtime database. In various places, I am hearing this is not an issue. Or is it?
Dec 10 04:21:06] VERBOSE[11687] logger.c: -- Executing [404@ext-queues:10] ESC[1;36;40mSetESC[0;37;40m("ESC[1;35;40mSIP/ddick-b7cfdd00ESC[0;37;40m", "ESC[1;35;40m__CWIGNORE=TRUEESC[0;37;40m") in new stack
[Dec 10 04:21:06] DEBUG[11687] pbx.c: Launching 'Queue'
[Dec 10 04:21:06] VERBOSE[11687] logger.c: -- Executing [404@ext-queues:11] ESC[1;36;40mQueueESC[0;37;40m("ESC[1;35;40mSIP/ddick-b7cfdd00ESC[0;37;40m", "ESC[1;35;40m404,tr,,,90ESC[0;37;40m") in new stack
[Dec 10 04:21:06] DEBUG[11687] app_queue.c: queue: 404, options: tr, url: , announce: , expires: 1260440556, priority: 0
[Dec 10 04:21:06] DEBUG[11687] db.c: Unable to find key '505' in family 'NeoAgenternal'
[Dec 10 04:21:06] DEBUG[11687] db.c: Unable to find key '504' in family 'NeoAgenternal'
[Dec 10 04:21:06] DEBUG[11687] db.c: Unable to find key '503' in family 'NeoAgenternal'
[Dec 10 04:21:06] DEBUG[11687] db.c: Unable to find key '519' in family 'NeoAgenternal'
[Dec 10 04:21:06] DEBUG[11687] db.c: Unable to find key '518' in family 'NeoAgenternal'
[Dec 10 04:21:06] DEBUG[11687] db.c: Unable to find key '517' in family 'NeoAgenternal'
[Dec 10 04:21:06] DEBUG[11687] db.c: Unable to find key '516' in family 'NeoAgenternal'
[Dec 10 04:21:06] DEBUG[11687] db.c: Unable to find key '515' in family 'NeoAgenternal'
[Dec 10 04:21:06] DEBUG[11687] db.c: Unable to find key '514' in family 'NeoAgenternal'
[Dec 10 04:21:06] DEBUG[11687] db.c: Unable to find key '512' in family 'NeoAgenternal'
[Dec 10 04:21:06] DEBUG[11687] app_queue.c: Queue '404' Join, Channel 'SIP/ddick-b7cfdd00', Position '1'
[Dec 10 04:21:06] DEBUG[11687] channel.c: Driver for channel 'SIP/ddick-b7cfdd00' does not support indication 3, emulating it
[Dec 10 04:21:06] DEBUG[11687] channel.c: Set channel SIP/ddick-b7cfdd00 to write format slin
[Dec 10 04:21:06] DEBUG[11687] channel.c: Scheduling timer at 160 sample intervals
Hi,
It seems that you are facing the same as the rest of us. I hvae the same entries in full log as you.
Your queues will work if you set their ringing strategy to ringall. I know this is not a solution but just a workaround.
I have submitted a bug here: http://www.trixbox.org/issue/agents-queue-do-not-ring-user-gets-m...
I've just switched recently on TB 2.8 and it seems that I have same problem. Further more even on strategy ringall sometimes asterisk doesn't connect to free agents.
I use static agents, but it's really annoying malfunction of PBX.
Regards,
Marcin
Hi!
Any success? I have 12 static (soft-phone and analog phones) agent in a queue, but sometimes not rings (I have also have two Zaptel extensions (ZAP/1 , ZAP/2) - the first one always ring when incoming call but the second one not - sometimes rings...) I use ringall strategy but no sucess...
Static Agents can exist more then one queue? I have two queue ( Queue 3001, and queue 3002 - the ZAP/1 extension (Ext 301) is static agent in the queues (3001 and 3002)
So any suggestion what should we do?
Thanks
Josh
I have a clean install of 2.8.0.3 with issues with the Queues that I have now resolved. They do not exactly match these described but are close enough that I thought it worth commenting.
We are using a ringall non-busy strategy with dynamic agents, but once we have more than one agent logged in these refuse to ring.
Closer examination suggested that the dialparties.agi script never finishes. Having looked at the php and added various debug comments I discovered that the is_ext_avail fails at the point it makes its manager call (is this due to overlapping log-ins or a manager bug??).
Anyway, I have temporarily fixed this by moving the two lines that instantiate the manager php object and connect it to the server into the is_ext_avail function. This may seem inefficient, but in our circumstances this is the only place it was used and it is only used once, hence it shouldn't be that bad. (oh and eventually I realised I need to edit /var/www/html/admin/modules/core/agi-bin/dialparties.agi so that it doesn't get overwritten!!!).
Anyway, this is working, suggesting to me that the cause of these issues may be the manager object used by dialparties.agi failing to work correctly, having been created as the script first fired. Opinions and longer-term fixes from anyone who actually knows the internals would be very welcome.
Dear all,
I have recently installed 2.8.0.3 and had simillar problems. I could only get the queues working with ringall. Ian, Can you tell me exactly what to modify in dialparties.agi in order to test your fix?
I have a customer with the same issue.
He is running TB 2.8.0.3.
Works fine on RINGALL but not with ROUNDROBIN
What I have tried is moving these lines from the top of the script to the is_exten_avail function at the bottom:
$astman = new AGI_AsteriskManager( );
if (!$astman->connect("127.0.0.1", $ampmgruser , $ampmgrpass)) {
return 0;
}
the results are better, but still inconsistent - with occasional agents left idle while calls queue and frequent calls put through to call waiting (which is not the behavior we want).
We are now investigating a solution with a daemon listening to the manager and updating a shared memory segment with the status of each extension. Dialparties can then grab the extension status from shared memory, rather than initiating a manager connection.
Will post if it works!
I have done a good amount of searching with regards to this issue. I do not see any mention of it outside of Trixbox. This concerns me as all indications seem to point towards Asterisk as the issue. Some have mentioned that the issue did not occur until updating to the recent releases of Asterisk.
I have been using Trixbox for a number of years and am in the process of performing an upgrade to V2.8.0.3. However, this is a big issue for us. I am not able to operator the queues as we have done for years. I also do not see any solutions. I have attempted to investigate the changes to the modules.conf. First off app_queue.so is not in the file in the first place. Second reloading and unloading/loading the app_queue.so does not fix the problem, so I have little confidence that any changes to the modules.conf are going to resolve this issue.
With the second proposed solution I am not sure if it is a type or if the user is possible on a different version of Asterisk, but where he has:
$astman = new AGI_AsteriskManager( );
if (!$astman->connect("127.0.0.1", $ampmgruser , $ampmgrpass)) {
return 0;
}
I have:
$astman = $AGI->new_AsteriskManager();
if (!$astman->connect("127.0.0.1", $ampmgruser , $ampmgrpass)) {
exit (1);
}
}
Even though there is a difference I attempted to make the changes suggested but it did not seem to make a difference. Although I moved the following as it would be the complete statement and not just the suggested suggested.
if (!$has_extension_state) {
$astman = $AGI->new_AsteriskManager();
if (!$astman->connect("127.0.0.1", $ampmgruser , $ampmgrpass)) {
exit (1);
}
}
Does anybody know what the issue is? Is there a solution to this problem? Why is there no mention of this issue with other systems?
I would like to get to the bottom of this. As I mentioned before this seems like a pretty big issue.
Regards,
-Eugene
For the last three days I thought that something is wrong with me! And then I came up with this post.
Does anyone have news about this issue?
I can confirm I am having the exact same issue.
Versions:
Trixbox v2.8.0.3
Asterisk 1.6.0.10-FONCORE-r40
Queue Status:
700 has 0 calls (max unlimited) in 'leastrecent' strategy (0s holdtime), W:0, C:0, A:0, SL:0.0% within 0s
Members:
Local/200@from-internal/n (dynamic) (Not in use) has taken no calls yet with total talktime 0s
Local/201@from-internal/n (dynamic) (Not in use) has taken no calls yet with total talktime 0s
No Callers
DEBUG Output:
[Jan 29 12:50:57] DEBUG[13293]: app_queue.c:3573 try_calling: SIP/192.168.2.45-b6b40128 is trying to call a queue member.
[Jan 29 12:50:57] DEBUG[13293]: db.c:197 ast_db_get: Unable to find key '201' in family 'NeoAgenternal'
[Jan 29 12:50:57] DEBUG[13293]: app_queue.c:2484 ring_one: Skipping 'Local/201@from-internal/n' with metric 0 because it is not online
[Jan 29 12:50:57] DEBUG[13293]: db.c:197 ast_db_get: Unable to find key '200' in family 'NeoAgenternal'
[Jan 29 12:50:57] DEBUG[13293]: app_queue.c:2484 ring_one: Skipping 'Local/200@from-internal/n' with metric 0 because it is not online
[Jan 29 12:50:57] DEBUG[13293]: app_queue.c:2462 ring_one: Nobody left to try ringing in queue
[Jan 29 12:50:57] NOTICE[13293]: app_queue.c:2699 wait_for_answer: No one is answering queue '700' (2/0/0)
I have no solution yet, I will carry on searching for the problem.
I'll add my name to the list. I've a freshly installed and updated version of 2.8.0.3 and my queues have stopped working and none of the fixes mentioned above has helped.
Hi! :
First excuse my poor English =).
Im facing the same problem, and after read the previous posts, I notice this line:
[Dec 10 04:21:06] DEBUG[11687] db.c: Unable to find key '512' in family 'NeoAgenternal'
I have the same lines:
[Jan 30 09:43:43] DEBUG[23782] app_queue.c: SIP/502-08cc3398 is trying to call a queue member. [Jan 30 09:43:43] DEBUG[23782] db.c: Unable to find key '503' in family 'NeoAgenternal' [Jan 30 09:43:43] DEBUG[23782] app_queue.c: Skipping 'Local/503@from-internal/n' with metric 0 because it is not online [Jan 30 09:43:43] DEBUG[23782] db.c: Unable to find key '501' in family 'NeoAgenternal'
then added manually in the cli this keys:
trixbox1*CLI> database put NeoAgenternal 501 TRUE Updated database successfully trixbox1*CLI> database put NeoAgenternal 503 TRUE Updated database successfully trixbox1*CLI> 501 and 503 are the agent numbers
then make some tests and the queue start working. Both agents dynamic and static seem to work properly after adding the keys.
The problem is, when restarting the server or the asterisk or the agent logout then you need to add the keys again,
Still doing tests, and looking for some real solution but maybe this can help in the meantime.
Regards
----
Edgar
La Paz - Bolivia
Hi all,
Last night I stayed up till morning hours upgrading my TB 2.8.0.3 in an effort to solve the queue problem described in this listing. Eventually, I maged to upgrade the asterisk and Dahdi to the latest ones from source (Ast 1.6.0-21 and Dahdi 2.2.1). After compiling asterisk a few times I manged to get it working. From a first test I did, it seems that the queues are now fixed (all ring modes work and also I solved the issue when the agent phone was ringing once).
I will know if the upgrade works tomorrow when our call center begins operation. I was about replacing Trixbox with Elastix 2 Beta1 (Ast 1.6.2-1) but although everything was OK, I had a problem with the PRI outgoing CID not being passed to my Telco Provider.
[logospbx ~]# asterisk -r
Asterisk 1.6.0.21, Copyright (C) 1999 - 2009 Digium, Inc. and others.
Created by Mark Spencer
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.0.21 currently running on logospbx (pid = 4094)
Verbosity is at least 3
logospbx*CLI> core show version
Asterisk 1.6.0.21 built by root @ logospbx on a i686 running Linux on 2010-01-31 01:58:43 UTC
If all is OK I will post the proceedure I used.
I feel the pain as I spent about three days smacking my head on the table as well. I am glad to see that m_michael50 may have a possible perminate solution. I do want to thank garuso for your post. If I do not hear from m_michael50 I may have to go that route to get things going.
I do have to say that I am surpprised that this has not been a bigger issue and addressed sooner...
-Eugene
Just wanted to check in an see if you have been able to test your solution. I am very interested in your solution.
Thanks,
-Eugene
I can now confirm that in my test system the queues problem is also solved when I compile Asterisk 1.6.0.21.
(Un)fortunately, I do not feel competent enough to do this operation on my productive system. Do we have any idea when TB will incorporate this *isk release?
Thanks
Hi there,
sorry for not getting back to you earlier. As yiannos said, all is fixed with 1.6.0.21 (and probably older versions). I could also compile to the latest 1.6.2.2 but did not install it.
Care should be taken when compiling the source code. I have a PRI card and had to install the latest dahdi code (compile from source). Then on my first attempt all worked OK except the CDR was not recorded in Mysql because during the make it did not find any mysql source code.
So in order to get it working you will need to download asterisk 1.6.0.21 & asterisk tools 1.6.0.4 and dahdi 2.2.2 (i am not sure about the versions). Also make sure to install mysql-devel (yum install mysql-devel).
Once you have installed the above then go to asterisk source (in /usr/src/asterisk-1.6.0.21) and do the following:
make clean
./configure
make menuselect (if you want ilibc codec and you have previously downloaded it by executing contrib/scripts/get_ilbc_source.sh)
and finally
make
and if all goes OK
make install
If your asterisk does not start (amportal restart) then check the permissions of the pid files in /var/run/asterisk (chmod -R asterisk:asterisk /var/run/asterisk)
And thats it.
As I said there is no limitation to go for the latest 1.6.2 version.
My only problem with Asterisk 1.6 is that my SipTAPI stopped working and after trying other TAPI solutions I could not get it working.
Michael.
Hi,
I tried the new update of TB with Asterisk 1.6.0.22 today.
Sadly, the queues did not work again.
I did two tests: a) one clean install with just a queue and two extensions and b) restore my original config from my working installation where I also have the queues problem.
In both cases, the queues did not ring any agents unless I set them to "ringall".
Given that I (and Michael above) was succesful when I compiled 1.6.0.21 on my test system, could this mean that the queues are broken *again* one asterisk version later?
Although I have not tried the 1.6.0.21 version from source, I did update the asterisk version to 1.6.0.22 from rpm. But found the queue to have the same problem as the 1.6.0.10 version.
I am now going to try to compile the 1.6.0.21 from source and see if it solves the problem just the other 2 did.
Henry
Since it seemed really odd to have the problem solved in one version (1.6.0.21) and re-broken in the next (1.6.0.22), I did the following test:
-Installed TB 2.8.0.3 plain vanilla. Did NOT yum update. - Queues not working
-Compiled Asterisk 1.6.0.21 on top of this installation without anything else - Queues worked
-Updated TB via yum update to *isk 1.6.0.22 (among all other things) - Queues did not work. Even after going to PBX settings and re-saving my test extensions and queues.
-Downloaded and compiled 1.6.0.22 on top of this 'updated' installation (was already 1.6.0.22 through yum)-Queues worked!
I guess this goes to show that it is not an Asterisk problem but rather a problem of how Trixbox implements Asterisk in the distribution.
Note: By PlainVanilla I mean an empty TB install with just two sip extensions and one queue. Absolutely no other configuration.
Any other thoughts?
Here is what I did to solve the problem in the most elegant way. What I mean elegant means it will not install extra files on your trixbox system nor will it potentially break any future trixbox installation (yum updates).
Here it goes:
1. Install trixbox 2.8.0.3 in a virtual machine
2. Download asterisk 1.6.0.21 from asterisk website
3. Download the trixbox asterisk 1.6.0.22 source rpm
4. Extract the app_queue source code from asterisk 1.6.0.21 source I just downloaded and replace it over the one in trixbox asterisk 1.6.0.22 source
5. Compiled the modified trixbox asterisk 1.6.0.22. Save the outcome of the app_queue.so from the test environment
6. Upload the app_queue.so to your production server. Save the existing app_queue.so for roll back purpose. Put in the new app_queue.so and restart asterisk.
7. Voila!! you have a working queue for all the ringing strategy again.
The next 2 steps are optional, apply the following 2 options and you will no longer be updated with the new asterisk version from trixbox repository when you run yum update
8. add 'exclude=asterisk16*' line into /etc/yum.conf to prevent inadvertent upgrades to asterisk
9. yum install yum-utils; yumdownloader `yum list asterisk16\*|grep 1.6|cut -d. -f1` to backup current version of asterisk packages, in case need to be reinstalled
and Yiannos, you are right abour trixbox's version of asterisk 1.6.0.22 , it's modified to trixbox's need, it's not the same one as the original asterisk 1.6.0.22 version
Henry
UniC Solution
VoIP & Open Source Consultant
Hi Henry,
Thanks for the walkthrough above.
What I failed to comprehend is why you compile asterisk 1.6.0.21 on top of the TB/Ast 1.6.0.22 rpm. Why not compile the 1.6.0.22 asterisk? Or any other for that matter. Is there a specific reason you want to stick with 1.6.0.21?
BR
Yiannos:
This way I am only making changes to one file : app_queue.so
The reason I chose to use the app_queue.c from 1.6.0.21 is because that's the one found to be working from this forum. And since now you said the 1.6.0.22 original asterisk source works as well. I can also use the app_queue.c and compile it with the trixbox version of asterisk 1.6.0.22. The point is to not overwrite files over trixbox rpm files.
Henry
Henry, can you share new app_queue.so for us?
Since I have already posted the step by step solution. For people who wants to get right to the answer. I will offer the app_queue.so with $10 to my paypal account. Once again , this only works with trixbox 2.8.0.3 with asterisk version 1.6.0.22 (yum update on trixbox). I am open for private job to make app_queue.so work for your specific asterisk version.
Write me private messages with your email address, then I will send you my paypal info. Once I get $10 in my paypal , I will email you the app_queue.so with simple installation instruction.
or just send your request to b_ball_henry AT hotmail DOT com
Me too.... Just posted another thread about it:
http://www.trixbox.org/forums/trixbox-forums/help/queue-strategy-...
How can Trixbox have a distribution specific problem that so many people are reporting, and leave it go unfixed for this long?!
Clearly from the descriptions of being able to compile asterisk from native source and drop in app_queue.so over the top of it that points squarely at a problem with Trixbox, not an upstream issue?
I do not understand why you had to post another thread about the same issue. Just makes it harder for anyone searching about it.
Anyhow, no big deal,
Andrew just replied to my bug report and said he is working on it. Lets hope he finds a solution soon.
I have been installing a trixbox system to replace an old (like ancient old) asterisk install and happen to run across this gem of an issue.
After looking at bbhenry's solution I was somewhat apprehensive to do it as the app_queue application in the trixbox distribution has quite a few changes that I didn't want to lose. Looking at the code the problem turned out to be a partial implementation of something called NeoAgents (google wasn't that helpful but didn't really matter). The implementation is only partial however, and broken at that, in that it builds a string buffer with corrupted information (hence the NeoAgenternal in garuso's post above). So I disabled this weird check as it's pretty much not doing anything that I can tell. Below is the patch diff for those interested.
Another thing that might cause issues for some people if you are using standard extensions as static members is that the none of the extensions will get called after an asterisk restart until you reload the queue. This is due to the queue module being loaded before the dial plan and can be resolved by adding the lines below to your /etc/asterisk/modules.conf beneat the [modules] section.
load => pbx_config.so load => chan_local.so
As it can be quite a pain to compile this update here's a link to an app_queue.so to use if you'd like. This was compiled for my own use and so the usual disclaimers apply. It was compiled against asterisk16-1.6.0.22 so you will most likely need that version on your machine.
http://www.megaupload.com/?d=OYU54U2U
Diff for app_queue:
diff -uNr asterisk16-1.6.0.22/apps/app_queue.c asterisk16-1.6.0.22-fixqueue/apps/app_queue.c
--- asterisk16-1.6.0.22/apps/app_queue.c 2010-02-12 15:35:29.000000000 -0500
+++ asterisk16-1.6.0.22-fixqueue/apps/app_queue.c 2010-03-19 15:20:02.000000000 -0400
@@ -764,10 +764,12 @@
result = QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS;
} else {
+ /*
result = get_member_status_from_db(member);
if(result != QUEUE_NORMAL)
continue;
+ */
ao2_unlock(q);
ao2_ref(member, -1);
@@ -2550,11 +2552,14 @@
}
} else {
/* Agent with name including '#30' is linked agent*/
+ /*
if(strstr(best->interface, "#30\0") || (QUEUE_NORMAL == get_member_status_from_db(best->member)))
{
+ */
/* Ring just the best channel */
ast_debug(1, "Trying '%s' with metric %d\n", best->interface, best->metric);
ret = ring_entry(qe, best, busies);
+ /*
}
else
{
@@ -2562,6 +2567,7 @@
best->chan = NULL;
best->stillgoing = 0;
}
+ */
}
}
chameleoncoder,
Thank you for your input.
One clarification: In order to test your module, do we simply copy it inot the modules folder in place of the original? Or do we have to do something else? I would like to try it in my test system.
Rgds
Yiannos
Yes, simply copy it into the modules folder (keeping a backup of the original of course) and restart the asterisk to test it out. The only difference between it and the stock trixbox module is that I've disabled the incomplete and broken code that prevents the ring methods from working. You'll probably need to have the same version of asterisk as I listed in the post as well.
chameleoncoder, with Your module I solved a problem!
but not so easy.
1 - your module did not work:
module show like app_queue.so
0 modules loaded
2 - core show version
Asterisk 1.6.0.10-FONCORE-r40
3 - yum update asterisk16
4 - core show version
Asterisk 1.6.0.22-samy-r60
5 - Now it works!
module show like app_queue.so
1 modules loaded
hope this steps will help someone.
I found that after update asterisk, not all modules was updated, cdr did not workig etc.
so step 3 should be:
yum update asterisk16\*
Reporting back as promised...
Tried the fix on a fully patched TB 2.8.0.3 (meaning I already had asterisk 1.6.0.22 installed) and it worked like a charm.
Way to go Chameleoncoder! Thanks
Chameleoncoder - I tried your module and it does in fact allow the different ring strategies to work. But if one of the agents in the queue is on the phone and that is the agent that asterisk tries to dial (based on ring strategy), the caller gets a 'That extension is busy' message. Is the result = get_member_status_from_db(member); line that got commented out the piece that figures out which agents are actually available? It is possible that I'm doing something wrong, but in testing this is what I hit up against. Thanks for your efforts.
Tom
That line of code was used to check for a "special" sort of extensions's status, but nothing that anyone would miss running the stock trixbox install. I've tested the situation you described and the caller continues to wait on hold until the extension is free in my case. What are you using as the queue member channel type? If you're using a Local extension dial instead of a direct DAHDI/* or SIP/* type extension that may be the issue as the queue might interpret the voicemail system answering as an agent answering.
It's possible that is what is occurring. Snip from cli:
Members:
Local/2050@from-internal/n (Not in use) has taken no calls yet with total talktime 0s
Local/2051@from-internal/n (Not in use) has taken no calls yet with total talktime 0s
No Callers
These were setup via the Trixbox web gui (same queue show output is produced when logging in to the queue as a dynamic agent from an endpoint). Are you saying the line should read SIP/2050@from-internal instead? How would this be done differently?
Thanks again!
Tom
Ah yeah that does look like it could be the problem. By using the Local/ convention it follows the traditional dial path and therefore any features that are enabled on it like voicemail. In a perfect world trixbox would keep track of an extension's use and it wouldn't be a problem. That might even be what some of that unfinished code was relating to that I had to remove. For all my queues I use the direct channel for the members. So for example if I had extension 2050, and in my extensions config it was setup to point to DAHDI/25 then I would use DAHDI/25 as my queue member. If anyone else has more experience trying to use local channels in queues it would be great to know if there is another way to deal with this as I've never had a need to experiment with it myself.
Thanks for your help. Hopefully this will get fixed soon. FYI to anybody interested - we have another server running Trixbox 2.8.0.1 (Asterisk 1.6.0.9-samy-r27) where the queues work properly.
We've had the same problem and solved it by the following way:
1) edit the file: /etc/asterisk/queues_additional.conf
2) remove the "/n" from your static agents
FROM:
member=Local/10@from-internal/n,0
TO:
member=Local/10@from-internal,0
That's it. queues should now work again without problems!!!
bump.
01-Jun-2010!!
Just did a yum update, still broken.
Asterisk 1.6.0.22-samy-r60 built by root @ revisor.trixbox.com
This issue is open since Sep-09, soon a whole year have passed.
Does Fonaility support Trixbox CE and its community or is it dead?
I can not understand how a bug like this can take almost a year to be solved. It's true that there are fixes available, but they are just patches. I like a lot Trixbox and the great community behind it, but this kind of things cause a bad image over the open source projects, and also makes me feel less "comfortable" with TB.
I'd like to have the ability to solve the problem...
Update to asterisk 1.6.0.26 and execute this on asterisk console for each agent
database put NeoAgenternal 335 TRUE
335 is the agent number
This is still broken and none of the fixes on this page have worked for me. Unless my strategy is set to 'ringall', none of my phones ring.
My CLI hangs at
-- Executing [9000@ext-queues:11] Queue("DAHDI/1-1", "9000,tr,,") in new stack
until I hang up.
This is my version and my work around:
Asterisk 1.6.0.26-FONCORE-r78 built by root @ revisor.trixbox.com on a i686 running Linux on 2010-06-08 22:01:27 UTC
Trixbox: 2.8.0.4-1
The "database put" seems to work with dynamic and static clients.
database put NeoAgenternal 335 TRUE
And that seems to stick through a reboot so here is a fix for a fresh install so when adding a new extension you can have the entry automatically added.
--- /var/www/html/admin/modules/core/functions.inc.php 2010-06-30 20:18:36.000000000 -0600
+++ /var/www/html/admin/modules/core/functions.inc.php 2010-06-30 20:15:36.000000000 -0600
@@ -2694,6 +2694,7 @@
$existingdevices = $astman->database_get("AMPUSER",$user."/device");
if (empty($existingdevices)) {
$astman->database_put("AMPUSER",$user."/device",$id);
+ $astman->database_put("NeoAgenternal",$user,"TRUE");
} else {
$existingdevices_array = explode('&',$existingdevices);
if (!in_array($id, $existingdevices_array)) {
Hopefull this helps in the automation of adding extensions.
This can be tacked onto the bottom of the patch from above:
@@ -2775,7 +2774,6 @@
$astman->database_del("DEVICE",$account."/user");
$astman->database_del("DEVICE",$account."/default_user");
$astman->database_del("DEVICE",$account."/emergency_cid");
+ $astman->database_del("NeoAgenternal",$account);
}
//delete from devices table


Member Since:
2007-01-31