summaryrefslogtreecommitdiff
path: root/pbx
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-03-28 13:31:29 -0300
committerJoshua Colp <jcolp@digium.com>2016-04-05 18:29:30 -0300
commit1dc5e28624299b245da798418bec1fbc22872ac9 (patch)
treeeea30819e6da11e5073c49ea542f74e791e70e65 /pbx
parent051da5c3af90c8557577ae98cf0e32feefb3c927 (diff)
pbx: Add support for autohints.
This change introduces the concept of autohints. These are hints which are created as a result of device state changes occurring within the core. When this happens a hint will be created (if it does not exist already) using the device name as the extension. For example if a device state change is received for "PJSIP/bob" and autohints are enabled on a context then a hint will exist in that context for "bob" with a device of "PJSIP/bob". For virtual or custom device states the name after the type will be used. For example if the device state of "Custom:bob" changes then a hint will exist in that context for "bob" with a device of "Custom:bob". This functionality can be enabled in extensions.conf by placing "autohints=yes" in a context. ASTERISK-25881 #close Change-Id: I7e444c7da41b7b7d33374420fec658beeb18584e
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index 5848e91d8..eb2a64f70 100644
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -1900,6 +1900,8 @@ process_extension:
"Unable to include switch '%s' in context '%s' at line %d of %s\n",
v->value, cxt, v->lineno, vfile);
}
+ } else if (!strcasecmp(v->name, "autohints")) {
+ ast_context_set_autohints(con, ast_true(v->value));
} else {
ast_log(LOG_WARNING,
"==!!== Unknown directive: %s at line %d of %s -- IGNORING!!!\n",