[Home]

Summary:ASTERISK-09101: [patch] New function to change penalty value of current queue members
Reporter:Wolfgang Pichler (wuwu)Labels:
Date Opened:2007-03-25 23:25:30Date Closed:2007-11-06 16:04:01.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 9374.patch
( 1) app_queue.c.complete.patch
( 2) app_queue.c.patch
( 3) app_queue.c.patch2
( 4) setqmpenalty.patch
Description:The attached patch adds new manager and cli function and application to change the penalty of a queue member on the fly (without removing the member and readding the member to the queue)

Application:
PenaltyQueueMember([queuename]|interface[|penalty])

We are using this patch now for about 3 Months on a production system in a callcenter getting on peek around 80 calls concurrently - and it is working like a charm.

****** ADDITIONAL INFORMATION ******

Patch is made against asterisk 1.2.4 - but should be no problem to use with newer versions
Comments:By: Tilghman Lesher (tilghman) 2007-03-25 23:48:11

1) We'd need a disclaimer on file before we could even take a look at your patch.
2) The "right" way to do this would be with a dialplan function, as this is a task which alters an attribute of a queue member (dialplan function), not a task directly within the channel (application).
3) Patches which implement new features should be against SVN trunk, not against 1.2 or 1.4.  Both of those branches are feature frozen, as they are already in release; we do not add features to release branches.

By: John Bigelow (jbigelow) 2007-04-05 15:16:10

Disclaimer now on file.

By: Serge Vecher (serge-v) 2007-04-06 08:25:15

wumu: would you please address points 2) and 3) with a new patch?

By: Eliel Sardanons (eliel) 2007-05-28 20:23:19

I made this function to replace wuwu application and do it the "right" way.

The patch is agains SVN trunk (revision: 66315)

Disclaimer on file? Yes.

By: Eliel Sardanons (eliel) 2007-05-28 20:28:02

sorry
delete app_queue.c.patch, use app_queue.c.patch2
I change the function syntax (queuename isn't optional).

My first thought was that queuename could be optional, but queuename can be optional when we set the value (and set that penalty in all the queues for that member) but not for reading... And I think that could be confusing...

By: Eliel Sardanons (eliel) 2007-05-29 21:17:56

app_queue.c.complete.patch:
  My first patch didn't use wuwu's code, and was just the dialplan function (with some bugs I realize later).
  Merged wuwu's code (CLI application, AMI Action) with my code (dialplan function), with minor changes (use asterisk macros to traverse lists, use ast_strdup instead of strdup, etc)..
  Add ast_module_user_remove() ast_module_user_add().
  Changed some functions definitions to be updated for SVN trunk version.
  Add get_member_penalty (used in custom_function_read).
 
SVN revision: 66584

Disclaimer is on file.

By: Mark Michelson (mmichelson) 2007-10-10 15:55:43

I've updated the patch to take advantage of the astobj2 uses in app_queue, as well as NEW_CLI.

I also changed the CLI command some to allow for no queue to be specified (similar to the manager command) in order to set the penalty across all queues. I also changed the wording of the CLI command to be less confusing.

By: Mark Michelson (mmichelson) 2007-10-11 15:23:33

I uploaded a new version of 9374.patch after I realized that I completely forgot to test compile the first version I put up.

This one actually compiles, now :)

I have not tested it, however, but I would like for those who wish to use this to give it a test and report results of using it back.

By: Digium Subversion (svnbot) 2007-11-06 16:04:01.000-0600

Repository: asterisk
Revision: 89068

U   trunk/apps/app_queue.c

------------------------------------------------------------------------
r89068 | mmichelson | 2007-11-06 16:04:00 -0600 (Tue, 06 Nov 2007) | 5 lines

Added CLI and manager commands for changing a queue member's penalty

(closes issue ASTERISK-9101, reported and initially patched by wuwu, intermediate patch by eliel, and final patch by me)


------------------------------------------------------------------------