asterisk/apps
Matthew Jordan add46fd27c app_queue: Add RealTime support for queue rules
This patch gives the optional ability to keep queue rules in RealTime. It is
important to note that with this patch:
 (a) Queue rules in RealTime are only examined on module load/reload
 (b) Queue rules are loaded both from the queuerules.conf file as well as the
     RealTime backend
To inform app_queue to examine RealTime for queue rules, a new setting has been
added to queuerules.conf's general section "realtime_rules". RealTime queue
rules will only be used when this setting is set to "yes".

The schema for the database table supports a rule_name, time, min_penalty, and
max_penalty columns. min_penalty and max_penalty can be relative, if a '-' or
'+' literal is provided. Otherwise, the penalties are treated as constants.

For example:
rule_name, time, min_penalty, max_penalty
'default', '10', '20', '30'
'test2', '20', '30', '55'
'test2', '25', '-11', '+1111'
'test2', '400', '112', '333'
'test3', '0', '4564', '46546'
'test_rule', '40', '15', '50'

which would result in :

Rule: default
 - After 10 seconds, adjust QUEUE_MAX_PENALTY to 30 and adjust
   QUEUE_MIN_PENALTY to 20
Rule: test2
 - After 20 seconds, adjust QUEUE_MAX_PENALTY to 55 and adjust
   QUEUE_MIN_PENALTY to 30
 - After 25 seconds, adjust QUEUE_MAX_PENALTY by 1111 and adjust
   QUEUE_MIN_PENALTY by -11
 - After 400 seconds, adjust QUEUE_MAX_PENALTY to 333 and adjust
   QUEUE_MIN_PENALTY to 112
Rule: test3
 - After 0 seconds, adjust QUEUE_MAX_PENALTY to 46546 and adjust
   QUEUE_MIN_PENALTY to 4564
Rule: test_rule
 - After 40 seconds, adjust QUEUE_MAX_PENALTY to 50 and adjust
   QUEUE_MIN_PENALTY to 15

If you use RealTime, the queue rules will be always reloaded on a module
reload, even if the underlying file did not change. With the option disabled,
the rules will only be reloaded if the file was modified.

Review: https://reviewboard.asterisk.org/r/3607/

ASTERISK-23823 #close
Reported by: Michael K
patches:
  app_queue.c_realtime_trunk.patch uploaded by Michael K (License 6621)
........

Merged revisions 420624 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 00:14:53 +00:00
..
confbridge media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
Makefile Moved core logic from app_stasis to res_stasis 2013-04-15 16:43:47 +00:00
app_adsiprog.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_agent_pool.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_alarmreceiver.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_amd.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_authenticate.c Update Asterisk's CDRs for the new bridging framework 2013-06-17 03:00:38 +00:00
app_bridgewait.c app_bridgewait: Remove possibility of race condition between channels leaving/joining. 2014-07-25 10:54:49 +00:00
app_cdr.c CDRs: Synchronize dialplan applications that manipulate CDRs with the engine 2014-01-12 22:13:12 +00:00
app_celgenuserevent.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_chanisavail.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_channelredirect.c Merge in the bridge_construction branch to make the system use the Bridging API. 2013-05-21 18:00:22 +00:00
app_chanspy.c Stasis: Allow message types to be blocked 2014-08-06 12:55:28 +00:00
app_confbridge.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_controlplayback.c Add ControlPlayback manager action 2013-01-22 15:16:20 +00:00
app_dahdiras.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_db.c Don't throw a spurious error when using DBdeltree 2013-02-14 03:49:52 +00:00
app_dial.c accountcode: Slightly change accountcode propagation. 2014-07-24 22:48:38 +00:00
app_dictate.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_directed_pickup.c PickupChan: Add ability to specify channel uniqueids as well as channel names. 2013-11-22 16:43:21 +00:00
app_directory.c voicemail API callbacks: Extract the sayname API call to its own registerd callback. 2014-06-20 17:06:42 +00:00
app_disa.c app_cdr,app_forkcdr,func_cdr: Synchronize with engine when manipulating state 2013-12-19 00:50:01 +00:00
app_dumpchan.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
app_echo.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
app_exec.c Merged revisions 328247 via svnmerge from 2011-07-14 20:28:54 +00:00
app_externalivr.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_fax.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_festival.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_flash.c Opaquify ast_channel typedefs, fd arrays, and softhangup flag 2012-03-01 22:09:18 +00:00
app_followme.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_forkcdr.c Stasis: Allow message types to be blocked 2014-08-06 12:55:28 +00:00
app_getcpeid.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_ices.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_image.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_ivrdemo.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_jack.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_macro.c Clean up and ensure proper usage of alloca() 2012-07-31 20:21:43 +00:00
app_meetme.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_milliwatt.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
app_minivm.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_mixmonitor.c apps/app_mixmonitor: Add Options To Play Beep At Start Or Stop 2014-07-22 20:01:42 +00:00
app_morsecode.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_mp3.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_nbscat.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_originate.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
app_osplookup.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_page.c uniqueid: channel linkedid, ami, ari object creation with id's 2014-03-07 15:47:55 +00:00
app_playback.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_playtones.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
app_privacy.c Opaquify ast_channel structs and lists 2012-02-29 16:52:47 +00:00
app_queue.c app_queue: Add RealTime support for queue rules 2014-08-11 00:14:53 +00:00
app_read.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
app_readexten.c Opaquify ast_channel structs and lists 2012-02-29 16:52:47 +00:00
app_record.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
app_saycounted.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_sayunixtime.c Say: If SAY_DTMF_INTERRUPT is set to an ast_true value, jump on DTMF 2013-11-14 20:32:45 +00:00
app_senddtmf.c Add pause one second W dial modifier. 2012-09-28 18:27:02 +00:00
app_sendtext.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
app_setcallerid.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_skel.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_sms.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_softhangup.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
app_speech_utils.c datastores: Audit ast_channel_datastore_remove usage. 2014-07-28 18:58:43 +00:00
app_stack.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_stasis.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_system.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
app_talkdetect.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_test.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_transfer.c Documentation: doc fixes across various parts of the code for ASTERISK issues 23061,23028,23046,23027 2014-01-17 17:16:14 +00:00
app_url.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_userevent.c ARI: Add ability to raise arbitrary User Events 2014-05-22 16:09:51 +00:00
app_verbose.c Allow Asterisk to compile under GCC 4.10 2014-05-09 22:49:26 +00:00
app_voicemail.c Fix build in devmode. 2014-08-08 20:08:53 +00:00
app_voicemail.exports.in Remove some symbol exports that got missed in the removal of global symbols. 2012-06-15 15:33:41 +00:00
app_waitforring.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_waitforsilence.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
app_waituntil.c Merged revisions 328247 via svnmerge from 2011-07-14 20:28:54 +00:00
app_while.c Clean up and ensure proper usage of alloca() 2012-07-31 20:21:43 +00:00
app_zapateller.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
enter.h remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
leave.h remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00