Summary:ASTERISK-06798: [patch] load_realtime_queue with dbconfig overrides dynamic configuration
Reporter:j (j)Labels:
Date Opened:2006-04-17 15:48:28Date Closed:2007-08-30 17:39:41
Versions:Frequency of
Environment:Attachments:( 0) app_queue.c.patch

 I noticed that if you use an sql DB for queue configuration and also use the asterisk manager interface to configure members dynamically, the dynamic changes are overridden when certain events occur, such as executing 'show queues' with a queue name given, or any time someone joins the queue.

 I understand the importance of being able to update the configuration of a queue from a database in real time, yet using the asterisk manager interface to configure queues on-the-fly is also an important feature. Is there some harmony that can be acheived between the two?

 I've supplied a small patch that *sort of* solves the problem.

 In (stable) [my apologies, the version drop-down doesn't have this version in it yet] I simply told the load_realtime_queue function that if the queue already exists, don't load it from the database. This allows the queues to be loaded as needed (as they were before), but makes sure they're not overridden by loading them again even if they're already in memory.

 Perhaps you guys have a better solution?
 If the DB overrides queues that already exist in memory, this makes most of the functionality in the asterisk manager interface quite useless :(


Comments:By: Serge Vecher (serge-v) 2006-05-04 15:20:08


it is unlikely that such a functional change will be accepted into 1.2 series at this point. However, the possibility exists for trunk.

Please email the asterisk-dev list to solicit feedback and opinions on this. Or, better yet, join the developer's conference call every Tuesday (see asterisk.org->Developers for more info)

By: Serge Vecher (serge-v) 2006-06-05 20:04:00

bweschke: do you want to take a look at this one?

By: Serge Vecher (serge-v) 2006-09-01 12:35:50


By: jmls (jmls) 2006-10-31 12:49:53.000-0600

bweschke: do you want to take a look at this one?

By: jmls (jmls) 2006-11-25 02:01:43.000-0600

ping ping. housekeeping

By: jmls (jmls) 2007-02-11 03:38:51.000-0600

ping ping ping. housekeeping

By: BJ Weschke (bweschke) 2007-02-11 07:42:17.000-0600

So let me understand the issue a little better here... We're using RT and if the queue is loaded and using dynamic members (you've add with AddQueueMember) and then RT decides to do another reload of the queue ('show queue foo' or someone joins the queue [for member persistence]) and the dynamic members go away? If so, this sounds like a bug to me needing to be fixed across the board. Although, I'm not sure the patch is the right fix. Might be more appropriate to just note the members that are dynamic and find a way to retain them (as we do with a normal non-RT queue reload now).

By: j (j) 2007-02-12 09:04:32.000-0600

Yep. That's the gist of it.

Lots of things can reload the queue, including someone joining the queue.

It's been a while since I've checked to see if this is still happening. I think I found this issue way back with 1.2.6, but I don't see why it wouldn't still be there.

The patch I supplied was just a 'quick hack'. I'm sure there's a better way of dealing with it.

By: jmls (jmls) 2007-03-27 03:56:49

and where do we go from here ? Is it still an issue ? Have you tried this in 1.4 to see if the problem exists in there ?

If you could check 1.4 that would be great. thanks.

By: Mark Michelson (mmichelson) 2007-08-30 17:39:40

I just tested this in 1.4 (latest SVN, r81397) and it works fine. If further problems arise this can be reopened.