[Home]

Summary:ASTERISK-19793: Only last realtime member of a queue is not actually removed from queue when removed from database
Reporter:Marcus Haas (maha)Labels:
Date Opened:2012-04-24 16:37:26Date Closed:2012-08-15 18:18:07
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Addons/res_config_mysql Applications/app_queue
Versions:1.8.11.1 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-19514 Queue realtime does not remove members after removed from database: Queue fraud has no realtime members defined. No need for update
is related toASTERISK-20162 app_queue does no Status update on empty SQL result
is related toASTERISK-25644 No event in queue log when member leaves the queue
Environment:OpenSUSE 11.4 2.6.37.6-0.11-desktop #1 SMP PREEMPT 2011-12-19 23:39:38 +0100 x86_64 x86_64 x86_64 GNU/LinuxAttachments:( 0) debugLog
Description:In the example I have two MySQL realtime queue members in the Queue "Secuway" (local/8850@agents, local/8851@agents).

"QUEUE SHOW Secuway" displays both queue members.

Now I remove the first member from the database.

"QUEUE SHOW Secuway" displays the remaining member.

After removing the second and last queue member from MySQL, "QUEUE SHOW Secuway" still shows it and the debug log says "Queue Secuway has no realtime members defined. No need for update". Also there is no REMOVEMEMBER Action logged to the queue_log for the last queue member.

Full debug log is attached

Comments:By: Marcus Haas (maha) 2012-04-24 16:38:26.842-0500

Debug Log

By: Matt Jordan (mjordan) 2012-04-26 08:29:03.205-0500

Does this behavior occur if you use a core realtime driver, such as res_config_odbc?

By: Marcus Haas (maha) 2012-04-27 02:24:50.598-0500

I never used any other driver than res_config_mysql from the Add-ons package. If you need me to try, it would take some time to set-up the environment...

By: Matt Jordan (mjordan) 2012-04-30 08:27:43.632-0500

Its up to you if you'd like to reproduce this error with a core supported module.  As it is, res_config_mysql is in extended support, which means development efforts for it come from the open source community.  Response times may reflect that.

More information on module support states can be found here:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States

By: Marcus Haas (maha) 2012-05-02 17:15:16.570-0500

I finally managed to reproduce the error with res_config_odbc and realtime. The behaviour is exactly the same, regardless of the connection method and driver.

By: Ronny Becker (bioasterisk) 2012-07-17 04:26:02.221-0500

BUMP!

We have the same, too. We are using Asterisk 1.8.7 and everything is working fine. Now, a new System was built up on Asterisk 1.8.13 and we have exactly this behavior.

We use Realtime with MySQL. On 1.8.13 if a Member is added and he is the only one, you cannot remove him. Are there two members in the queue, you can remove one, but the last member stays in the queue and cannot be removed.
On 1.8.7 exactly the same Dialplan works fine.


By: Rusty Newton (rnewton) 2012-07-25 17:36:51.686-0500

Marked as related and duplicate to ASTERISK-20162

By: Ronny Becker (bioasterisk) 2012-07-26 00:07:01.090-0500

Just for documentation:
Using the realtime queue_member_table.
Everything is fine as long as you have users for the queue in the table. If you delete the last user or of you delete all users at once, there is no update on the queue Status made. The Problem is:

[Jul 23 07:49:39] DEBUG[10242] res_config_mysql.c: MySQL RealTime: Connection okay.
[Jul 23 07:49:39] DEBUG[10242] res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM queue_member_table WHERE interface LIKE '%' AND queue_name = 'bsimoe' ORDER BY interface
[Jul 23 07:49:39] DEBUG[10242] app_queue.c: Queue bsimoe has no realtime members defined. No need for update

If the SQL Query returns no result, there is no update made to the queue Status and all members that have been in the queue remain there. It has to remove all members of a queue if the SQL Query returns nothing.

This Bug came into asterisk between 1.8.7(works) and 1.8.13.

By: Ronny Becker (bioasterisk) 2012-07-26 00:08:29.362-0500

Is there any progress on this? For us this is a ShowStopper because we cannot use the current versions.

By: Martin Huleux (huleuxm) 2012-08-01 04:19:39.386-0500

The asterisk 1.8.15 is available now, any fix for this issue?

By: Matt Jordan (mjordan) 2012-08-01 08:33:00.638-0500

Your issue is in queue, please be patient, and we will get to it as time permits and developer resources become available.



By: Leif Madsen (lmadsen) 2013-01-28 22:09:29.207-0600

I can't figure out why this issue is closed... it says Digium Subversion closed the issue, but I see no commit message here...

By: Matt Jordan (mjordan) 2013-01-29 06:29:16.585-0600

Commit messages are shown on the Subversion tab. This went in under r371306.

By: Leif Madsen (lmadsen) 2013-01-29 06:52:55.446-0600

Oh man! That must be new since I last did bug triage... apparently it's been a while. Thanks! That's pretty slick :)