mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -287,6 +287,15 @@ int pbx_exec(struct ast_channel *c, struct ast_app *app, const char *data);
|
||||
*/
|
||||
struct ast_context *ast_context_find_or_create(struct ast_context **extcontexts, struct ast_hashtab *exttable, const char *name, const char *registrar);
|
||||
|
||||
/*!
|
||||
* \brief Enable or disable autohints support on a context
|
||||
*
|
||||
* \param con pointer to the context
|
||||
* \param enabled whether autohints are enabled
|
||||
*
|
||||
*/
|
||||
void ast_context_set_autohints(struct ast_context *con, int enabled);
|
||||
|
||||
/*!
|
||||
* \brief Merge the temporary contexts into a global contexts list and delete from the
|
||||
* global list the ones that are being added
|
||||
|
Reference in New Issue
Block a user