summaryrefslogtreecommitdiff
path: root/pbx
diff options
context:
space:
mode:
authorGeorge Joseph <george.joseph@fairview5.com>2014-10-13 16:12:17 +0000
committerGeorge Joseph <george.joseph@fairview5.com>2014-10-13 16:12:17 +0000
commitc7e6b6ba3d68d3666965286acf035d09c2fc3c9f (patch)
tree0adacef4f1d976c9e37434fd2ace78fafae578eb /pbx
parent8d6f1d763c69b0ebf04784e89d1cde8e1ac0acda (diff)
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
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_realtime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c
index de62851e0..6c8e671ed 100644
--- a/pbx/pbx_realtime.c
+++ b/pbx/pbx_realtime.c
@@ -206,7 +206,7 @@ static struct ast_variable *realtime_switch_common(const char *table, const char
match = ast_extension_match(cat, exten);
}
if (match) {
- var = ast_category_detach_variables(ast_category_get(cfg, cat));
+ var = ast_category_detach_variables(ast_category_get(cfg, cat, NULL));
break;
}
cat = ast_category_browse(cfg, cat);