Asterisk - The Open Source Telephony Project
21.4.1
|
Asterisk main include file. File version handling, generic pbx functions. More...
Go to the source code of this file.
Functions | |
int | ast_add_profile (const char *, uint64_t scale) |
support for event profiling More... | |
int | ast_cancel_shutdown (void) |
Cancel an existing shutdown and return to normal operation. More... | |
int | ast_fd_init (void) |
int64_t | ast_mark (int, int start1_stop0) |
int | ast_pbx_init (void) |
int | ast_pbx_uuid_get (char *pbx_uuid, int length) |
Retrieve the PBX UUID. More... | |
int64_t | ast_profile (int, int64_t) |
int | ast_register_atexit (void(*func)(void)) |
Register a function to be executed before Asterisk exits. More... | |
int | ast_register_cleanup (void(*func)(void)) |
Register a function to be executed before Asterisk gracefully exits. More... | |
int | ast_set_priority (int) |
We set ourselves to a high priority, that we might pre-empt everything else. If your PBX has heavy activity on it, this is a good thing. More... | |
int | ast_shutdown_final (void) |
int | ast_shutting_down (void) |
void | ast_unregister_atexit (void(*func)(void)) |
Unregister a function registered with ast_register_atexit(). More... | |
Asterisk main include file. File version handling, generic pbx functions.
Definition in file asterisk.h.
int ast_add_profile | ( | const char * | name, |
uint64_t | scale | ||
) |
support for event profiling
(note, this must be documented a lot more) ast_add_profile allocates a generic 'counter' with a given name, which can be shown with the command 'core show profile <name>'
The counter accumulates positive or negative values supplied by
support for event profiling
Definition at line 92 of file astman.c.
References ast_calloc, ast_realloc, and ast_strdup.
int ast_cancel_shutdown | ( | void | ) |
Cancel an existing shutdown and return to normal operation.
Definition at line 1881 of file asterisk.c.
References NOT_SHUTTING_DOWN, SHUTDOWN_FAST, and shutdown_pending.
int ast_fd_init | ( | void | ) |
int ast_pbx_init | ( | void | ) |
Provided by pbx.c
Definition at line 8989 of file pbx.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_container_alloc_hash, ao2_container_alloc_list, ao2_container_register(), ast_register_cleanup(), autohint_hash_cb(), hintdevice_cmp_multiple(), hintdevice_hash_cb(), and STASIS_MESSAGE_TYPE_INIT.
int ast_pbx_uuid_get | ( | char * | pbx_uuid, |
int | length | ||
) |
Retrieve the PBX UUID.
pbx_uuid | A buffer of at least AST_UUID_STR_LEN (36 + 1) size to receive the UUID |
length | The buffer length |
Definition at line 976 of file asterisk.c.
References ast_db_get().
Referenced by handle_show_settings().
int ast_register_atexit | ( | void(*)(void) | func | ) |
Register a function to be executed before Asterisk exits.
func | The callback function to use. |
0 | on success. |
-1 | on error. |
Definition at line 13 of file clicompat.c.
Referenced by ast_rtp_engine_init(), ast_stun_init(), astdb_init(), and load_module().
int ast_register_cleanup | ( | void(*)(void) | func | ) |
Register a function to be executed before Asterisk gracefully exits.
func | The callback function to use. |
0 | on success. |
-1 | on error. |
Definition at line 19 of file clicompat.c.
Referenced by aco_init(), app_init(), ast_aoc_cli_init(), ast_autoservice_init(), ast_bridging_init(), ast_bucket_init(), ast_builtins_init(), ast_channels_init(), ast_cli_channels_init(), ast_codec_init(), ast_device_state_engine_init(), ast_dns_system_resolver_init(), ast_endpoint_init(), ast_endpoint_stasis_init(), ast_file_init(), ast_format_cache_init(), ast_format_init(), ast_image_init(), ast_local_init(), ast_media_cache_init(), ast_msg_init(), ast_named_locks_init(), ast_parking_stasis_init(), ast_pbx_init(), ast_pickup_init(), ast_refer_init(), ast_rtp_engine_init(), ast_security_stasis_init(), ast_sorcery_init(), ast_stasis_channels_init(), ast_stasis_system_init(), ast_test_init(), ast_timing_init(), ast_tps_init(), ast_translate_init(), astobj2_init(), devstate_init(), dns_core_init(), load_pbx(), load_pbx_app(), load_pbx_builtins(), load_pbx_functions_cli(), load_pbx_hangup_handler(), load_pbx_switch(), load_pbx_variables(), manager_bridging_init(), manager_channels_init(), manager_endpoints_init(), manager_mwi_init(), manager_system_init(), mwi_init(), register_config_cli(), and stasis_init().
int ast_set_priority | ( | int | ) |
We set ourselves to a high priority, that we might pre-empt everything else. If your PBX has heavy activity on it, this is a good thing.
Provided by asterisk.c
Definition at line 1841 of file asterisk.c.
Referenced by main(), safe_exec_prep(), and set_priority_all().
int ast_shutdown_final | ( | void | ) |
The server is releasing resources and unloading modules. It won't be long now.
Definition at line 1871 of file asterisk.c.
References SHUTTING_DOWN_FINAL.
Referenced by load_resource().
int ast_shutting_down | ( | void | ) |
The server is preventing new channel creation in preparation for shutdown and may actively be releasing resources. The shutdown process may be canceled by ast_cancel_shutdown() if it is not too late.
Definition at line 1876 of file asterisk.c.
References shutdown_pending.
Referenced by __ast_channel_alloc_ap(), ast_cli_command_full(), ast_unregister_translator(), confbridge_exec(), and process_message().
void ast_unregister_atexit | ( | void(*)(void) | func | ) |
Unregister a function registered with ast_register_atexit().
func | The callback function to unregister. |
Definition at line 1064 of file asterisk.c.
References AST_LIST_LOCK, and AST_LIST_UNLOCK.