summaryrefslogtreecommitdiff
path: root/main/pbx.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c
index b2c365a9b..3e6f07a0c 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -5833,6 +5833,24 @@ static int ast_add_hint(struct ast_exten *e)
ast_get_context_name(ast_get_extension_context(e)));
}
+ /* if not dynamic */
+ if (!(strstr(e->app, "${") && e->exten[0] == '_')) {
+ struct ast_state_cb *state_cb;
+ struct ao2_iterator cb_iter;
+
+ /* For general callbacks */
+ cb_iter = ao2_iterator_init(statecbs, 0);
+ for (; (state_cb = ao2_iterator_next(&cb_iter)); ao2_ref(state_cb, -1)) {
+ execute_state_callback(state_cb->change_cb,
+ ast_get_context_name(ast_get_extension_context(e)),
+ ast_get_extension_name(e),
+ state_cb->data,
+ AST_HINT_UPDATE_DEVICE,
+ hint_new,
+ NULL);
+ }
+ ao2_iterator_destroy(&cb_iter);
+ }
ao2_unlock(hints);
ao2_ref(hint_new, -1);