asterisk/pbx
George Joseph c7e6b6ba3d manager/config: Support templates and non-unique category names via AMI
This patch provides the capability to manipulate templates and categories
with non-unique names via AMI.

Summary of changes:

GetConfig and GetConfigJSON: Added "Filter" parameter:  A comma separated list
of name_regex=value_regex expressions which will cause only categories whose
variables match all expressions to be considered.  The special variable name
TEMPLATES can be used to control whether templates are included.  Passing
'include' as the value will include templates along with normal categories.
Passing 'restrict' as the value will restrict the operation to ONLY templates.
Not specifying a TEMPLATES expression results in the current default behavior
which is to not include templates.

UpdateConfig: NewCat now includes options for allowing duplicate category
names, indicating if the category should be created as a template, and
specifying templates the category should inherit from.  The rest of the
actions now accept a filter string as defined above.  If there are non-unique
category names, you can now update specific ones based on variable values.

To facilitate the new capabilities in manager, corresponding changes had to be
made to config, most notably the addition of filter criteria to many of the
APIs.  In some cases it was easy to change the references to use the new
prototype but others would have required touching too many files for this
patch so a wrapper with the original prototype was created.  Macros couldn't
be used in this case because it would break binary compatibility with modules
such as res_digium_phone that are linked to real symbols.

Tested-by: George Joseph

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

Merged revisions 425383 from http://svn.asterisk.org/svn/asterisk/branches/12
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-13 16:12:17 +00:00
..
ael/ael-test Merged revisions 299449 via svnmerge from 2010-12-22 20:10:34 +00:00
dundi-parser.c Allow Asterisk to compile under GCC 4.10 2014-05-09 22:49:26 +00:00
dundi-parser.h Remove built-in AES code and use optional_api instead 2010-07-21 19:11:32 +00:00
Makefile pbx/Makefile: Revert r423237 2014-09-16 22:46:29 +00:00
pbx_ael.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
pbx_config.c core: Don't allow free to mean ast_free (and malloc, etc..). 2014-09-26 14:41:38 +00:00
pbx_dundi.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
pbx_loopback.c Check result of ast_var_assign() calls for memory allocation failure. 2013-08-06 08:36:15 +00:00
pbx_lua.c pbx_lua: fix regression with global sym export and context clash by pbx_config. 2014-08-06 16:12:26 +00:00
pbx_realtime.c manager/config: Support templates and non-unique category names via AMI 2014-10-13 16:12:17 +00:00
pbx_spool.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00