Asterisk - The Open Source Telephony Project GIT-master-3dae2cf
Macros | Enumerations | Variables
options.h File Reference

Options provided by main asterisk program. More...

#include "asterisk/autoconfig.h"
Include dependency graph for options.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AST_CACHE_DIR_LEN   512
 
#define AST_CHANNEL_NAME   80
 
#define AST_DEFAULT_OPTIONS   (AST_OPT_FLAG_TRANSCODE_VIA_SLIN | AST_OPT_FLAG_CACHE_MEDIA_FRAMES)
 
#define AST_FILENAME_MAX   80
 
#define ast_fully_booted   ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)
 
#define ast_opt_always_fork   ast_test_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK)
 
#define ast_opt_cache_media_frames   ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_MEDIA_FRAMES)
 
#define ast_opt_cache_record_files   ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES)
 
#define ast_opt_console   ast_test_flag(&ast_options, AST_OPT_FLAG_CONSOLE)
 
#define ast_opt_dbg_module   ast_test_flag(&ast_options, AST_OPT_FLAG_DEBUG_MODULE)
 
#define ast_opt_dont_warn   ast_test_flag(&ast_options, AST_OPT_FLAG_DONT_WARN)
 
#define ast_opt_dump_core   ast_test_flag(&ast_options, AST_OPT_FLAG_DUMP_CORE)
 
#define ast_opt_exec   ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC)
 
#define ast_opt_exec_includes   ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC_INCLUDES)
 
#define ast_opt_force_black_background   ast_test_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND)
 
#define ast_opt_generic_plc   ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC)
 
#define ast_opt_generic_plc_on_equal_codecs   ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS)
 
#define ast_opt_hide_connect   ast_test_flag(&ast_options, AST_OPT_FLAG_HIDE_CONSOLE_CONNECT)
 
#define ast_opt_hide_messaging_ami_events   ast_test_flag(&ast_options, AST_OPT_FLAG_HIDE_MESSAGING_AMI_EVENTS)
 
#define ast_opt_high_priority   ast_test_flag(&ast_options, AST_OPT_FLAG_HIGH_PRIORITY)
 
#define ast_opt_init_keys   ast_test_flag(&ast_options, AST_OPT_FLAG_INIT_KEYS)
 
#define ast_opt_light_background   ast_test_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND)
 
#define ast_opt_lock_confdir   ast_test_flag(&ast_options, AST_OPT_FLAG_LOCK_CONFIG_DIR)
 
#define ast_opt_mute   ast_test_flag(&ast_options, AST_OPT_FLAG_MUTE)
 
#define ast_opt_no_color   ast_test_flag(&ast_options, AST_OPT_FLAG_NO_COLOR)
 
#define ast_opt_no_fork   ast_test_flag(&ast_options, AST_OPT_FLAG_NO_FORK)
 
#define ast_opt_quiet   ast_test_flag(&ast_options, AST_OPT_FLAG_QUIET)
 
#define ast_opt_reconnect   ast_test_flag(&ast_options, AST_OPT_FLAG_RECONNECT)
 
#define ast_opt_ref_debug   ast_test_flag(&ast_options, AST_OPT_FLAG_REF_DEBUG)
 
#define ast_opt_remote   ast_test_flag(&ast_options, AST_OPT_FLAG_REMOTE)
 
#define ast_opt_sounds_search_custom   ast_test_flag(&ast_options, AST_OPT_FLAG_SOUNDS_SEARCH_CUSTOM)
 
#define ast_opt_timestamp   ast_test_flag(&ast_options, AST_OPT_FLAG_TIMESTAMP)
 
#define ast_opt_trace_module   ast_test_flag(&ast_options, AST_OPT_FLAG_TRACE_MODULE)
 
#define ast_opt_transcode_via_slin   ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSCODE_VIA_SLIN)
 
#define ast_opt_transmit_silence   ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSMIT_SILENCE)
 
#define AST_PJPROJECT_INIT_LOG_LEVEL()
 Get maximum log level pjproject was compiled with. More...
 
#define DEFAULT_PJ_LOG_MAX_LEVEL   2
 
#define DEFAULT_PJPROJECT_CACHE_POOLS   1
 
#define MAX_PJ_LOG_MAX_LEVEL   6
 

Enumerations

enum  ast_option_flags {
  AST_OPT_FLAG_EXEC_INCLUDES = (1 << 0) , AST_OPT_FLAG_NO_FORK = (1 << 1) , AST_OPT_FLAG_QUIET = (1 << 2) , AST_OPT_FLAG_CONSOLE = (1 << 3) ,
  AST_OPT_FLAG_HIGH_PRIORITY = (1 << 4) , AST_OPT_FLAG_INIT_KEYS = (1 << 5) , AST_OPT_FLAG_REMOTE = (1 << 6) , AST_OPT_FLAG_EXEC = (1 << 7) ,
  AST_OPT_FLAG_NO_COLOR = (1 << 8) , AST_OPT_FLAG_FULLY_BOOTED = (1 << 9) , AST_OPT_FLAG_TRANSCODE_VIA_SLIN = (1 << 10) , AST_OPT_FLAG_STDEXTEN_MACRO = (1 << 11) ,
  AST_OPT_FLAG_DUMP_CORE = (1 << 12) , AST_OPT_FLAG_CACHE_RECORD_FILES = (1 << 13) , AST_OPT_FLAG_TIMESTAMP = (1 << 14) , AST_OPT_FLAG_CACHE_MEDIA_FRAMES = (1 << 15) ,
  AST_OPT_FLAG_RECONNECT = (1 << 16) , AST_OPT_FLAG_TRANSMIT_SILENCE = (1 << 17) , AST_OPT_FLAG_DONT_WARN = (1 << 18) , AST_OPT_FLAG_SOUNDS_SEARCH_CUSTOM = (1 << 19) ,
  AST_OPT_FLAG_REF_DEBUG = (1 << 20) , AST_OPT_FLAG_ALWAYS_FORK = (1 << 21) , AST_OPT_FLAG_MUTE = (1 << 22) , AST_OPT_FLAG_DEBUG_MODULE = (1 << 23) ,
  AST_OPT_FLAG_TRACE_MODULE = (1 << 24) , AST_OPT_FLAG_LIGHT_BACKGROUND = (1 << 25) , AST_OPT_FLAG_HIDE_MESSAGING_AMI_EVENTS = (1 << 26) , AST_OPT_FLAG_FORCE_BLACK_BACKGROUND = (1 << 27) ,
  AST_OPT_FLAG_HIDE_CONSOLE_CONNECT = (1 << 28) , AST_OPT_FLAG_LOCK_CONFIG_DIR = (1 << 29) , AST_OPT_FLAG_GENERIC_PLC = (1 << 30) , AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS = (1 << 31) ,
  AST_OPT_FLAG_EXEC_INCLUDES = (1 << 0) , AST_OPT_FLAG_NO_FORK = (1 << 1) , AST_OPT_FLAG_QUIET = (1 << 2) , AST_OPT_FLAG_CONSOLE = (1 << 3) ,
  AST_OPT_FLAG_HIGH_PRIORITY = (1 << 4) , AST_OPT_FLAG_INIT_KEYS = (1 << 5) , AST_OPT_FLAG_REMOTE = (1 << 6) , AST_OPT_FLAG_EXEC = (1 << 7) ,
  AST_OPT_FLAG_NO_COLOR = (1 << 8) , AST_OPT_FLAG_FULLY_BOOTED = (1 << 9) , AST_OPT_FLAG_TRANSCODE_VIA_SLIN = (1 << 10) , AST_OPT_FLAG_DUMP_CORE = (1 << 12) ,
  AST_OPT_FLAG_CACHE_RECORD_FILES = (1 << 13) , AST_OPT_FLAG_TIMESTAMP = (1 << 14) , AST_OPT_FLAG_OVERRIDE_CONFIG = (1 << 15) , AST_OPT_FLAG_RECONNECT = (1 << 16) ,
  AST_OPT_FLAG_TRANSMIT_SILENCE = (1 << 17) , AST_OPT_FLAG_DONT_WARN = (1 << 18) , AST_OPT_FLAG_ALWAYS_FORK = (1 << 21) , AST_OPT_FLAG_MUTE = (1 << 22) ,
  AST_OPT_FLAG_DEBUG_FILE = (1 << 23) , AST_OPT_FLAG_LIGHT_BACKGROUND = (1 << 25) , AST_OPT_FLAG_FORCE_BLACK_BACKGROUND = (1 << 27)
}
 

Variables

char ast_defaultlanguage []
 
int ast_language_is_prefix
 The following variable controls the layout of localized sound files. If 0, use the historical layout with prefix just before the filename (i.e. digits/en/1.gsm , digits/it/1.gsm or default to digits/1.gsm), if 1 put the prefix at the beginning of the filename (i.e. en/digits/1.gsm, it/digits/1.gsm or default to digits/1.gsm). The latter permits a language to be entirely in one directory. More...
 
struct timeval ast_lastreloadtime
 
pid_t ast_mainpid
 
int ast_option_maxcalls
 
int ast_option_maxfiles
 
double ast_option_maxload
 
int ast_option_pjproject_cache_pools
 
int ast_option_pjproject_log_level
 
unsigned int ast_option_rtpptdynamic
 
int ast_option_rtpusedynamic
 
struct ast_flags ast_options
 
int ast_pjproject_max_log_level
 
struct timeval ast_startuptime
 
int option_debug
 
unsigned int option_dtmfminduration
 
long option_minmemfree
 
int option_trace
 
int option_verbose
 
char record_cache_dir [AST_CACHE_DIR_LEN]
 

Detailed Description

Options provided by main asterisk program.

Definition in file options.h.

Macro Definition Documentation

◆ AST_CACHE_DIR_LEN

#define AST_CACHE_DIR_LEN   512

Definition at line 32 of file options.h.

◆ AST_CHANNEL_NAME

#define AST_CHANNEL_NAME   80

Max length of an ast_channel name

Definition at line 34 of file options.h.

◆ AST_DEFAULT_OPTIONS

These are the options that set by default when Asterisk starts

Definition at line 106 of file options.h.

◆ AST_FILENAME_MAX

#define AST_FILENAME_MAX   80

Definition at line 33 of file options.h.

◆ ast_fully_booted

#define ast_fully_booted   ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)

Definition at line 117 of file options.h.

◆ ast_opt_always_fork

#define ast_opt_always_fork   ast_test_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK)

Definition at line 126 of file options.h.

◆ ast_opt_cache_media_frames

#define ast_opt_cache_media_frames   ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_MEDIA_FRAMES)

Definition at line 121 of file options.h.

◆ ast_opt_cache_record_files

#define ast_opt_cache_record_files   ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES)

Definition at line 120 of file options.h.

◆ ast_opt_console

#define ast_opt_console   ast_test_flag(&ast_options, AST_OPT_FLAG_CONSOLE)

Definition at line 111 of file options.h.

◆ ast_opt_dbg_module

#define ast_opt_dbg_module   ast_test_flag(&ast_options, AST_OPT_FLAG_DEBUG_MODULE)

Definition at line 128 of file options.h.

◆ ast_opt_dont_warn

#define ast_opt_dont_warn   ast_test_flag(&ast_options, AST_OPT_FLAG_DONT_WARN)

Definition at line 125 of file options.h.

◆ ast_opt_dump_core

#define ast_opt_dump_core   ast_test_flag(&ast_options, AST_OPT_FLAG_DUMP_CORE)

Definition at line 119 of file options.h.

◆ ast_opt_exec

#define ast_opt_exec   ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC)

Definition at line 115 of file options.h.

◆ ast_opt_exec_includes

#define ast_opt_exec_includes   ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC_INCLUDES)

Definition at line 108 of file options.h.

◆ ast_opt_force_black_background

#define ast_opt_force_black_background   ast_test_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND)

Definition at line 131 of file options.h.

◆ ast_opt_generic_plc

#define ast_opt_generic_plc   ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC)

Definition at line 134 of file options.h.

◆ ast_opt_generic_plc_on_equal_codecs

#define ast_opt_generic_plc_on_equal_codecs   ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS)

Definition at line 136 of file options.h.

◆ ast_opt_hide_connect

#define ast_opt_hide_connect   ast_test_flag(&ast_options, AST_OPT_FLAG_HIDE_CONSOLE_CONNECT)

Definition at line 132 of file options.h.

◆ ast_opt_hide_messaging_ami_events

#define ast_opt_hide_messaging_ami_events   ast_test_flag(&ast_options, AST_OPT_FLAG_HIDE_MESSAGING_AMI_EVENTS)

Definition at line 137 of file options.h.

◆ ast_opt_high_priority

#define ast_opt_high_priority   ast_test_flag(&ast_options, AST_OPT_FLAG_HIGH_PRIORITY)

Definition at line 112 of file options.h.

◆ ast_opt_init_keys

#define ast_opt_init_keys   ast_test_flag(&ast_options, AST_OPT_FLAG_INIT_KEYS)

Definition at line 113 of file options.h.

◆ ast_opt_light_background

#define ast_opt_light_background   ast_test_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND)

Definition at line 130 of file options.h.

◆ ast_opt_lock_confdir

#define ast_opt_lock_confdir   ast_test_flag(&ast_options, AST_OPT_FLAG_LOCK_CONFIG_DIR)

Definition at line 133 of file options.h.

◆ ast_opt_mute

#define ast_opt_mute   ast_test_flag(&ast_options, AST_OPT_FLAG_MUTE)

Definition at line 127 of file options.h.

◆ ast_opt_no_color

#define ast_opt_no_color   ast_test_flag(&ast_options, AST_OPT_FLAG_NO_COLOR)

Definition at line 116 of file options.h.

◆ ast_opt_no_fork

#define ast_opt_no_fork   ast_test_flag(&ast_options, AST_OPT_FLAG_NO_FORK)

Definition at line 109 of file options.h.

◆ ast_opt_quiet

#define ast_opt_quiet   ast_test_flag(&ast_options, AST_OPT_FLAG_QUIET)

Definition at line 110 of file options.h.

◆ ast_opt_reconnect

#define ast_opt_reconnect   ast_test_flag(&ast_options, AST_OPT_FLAG_RECONNECT)

Definition at line 123 of file options.h.

◆ ast_opt_ref_debug

#define ast_opt_ref_debug   ast_test_flag(&ast_options, AST_OPT_FLAG_REF_DEBUG)

Definition at line 135 of file options.h.

◆ ast_opt_remote

#define ast_opt_remote   ast_test_flag(&ast_options, AST_OPT_FLAG_REMOTE)

Definition at line 114 of file options.h.

◆ ast_opt_sounds_search_custom

#define ast_opt_sounds_search_custom   ast_test_flag(&ast_options, AST_OPT_FLAG_SOUNDS_SEARCH_CUSTOM)

Definition at line 138 of file options.h.

◆ ast_opt_timestamp

#define ast_opt_timestamp   ast_test_flag(&ast_options, AST_OPT_FLAG_TIMESTAMP)

Definition at line 122 of file options.h.

◆ ast_opt_trace_module

#define ast_opt_trace_module   ast_test_flag(&ast_options, AST_OPT_FLAG_TRACE_MODULE)

Definition at line 129 of file options.h.

◆ ast_opt_transcode_via_slin

#define ast_opt_transcode_via_slin   ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSCODE_VIA_SLIN)

Definition at line 118 of file options.h.

◆ ast_opt_transmit_silence

#define ast_opt_transmit_silence   ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSMIT_SILENCE)

Definition at line 124 of file options.h.

◆ AST_PJPROJECT_INIT_LOG_LEVEL

#define AST_PJPROJECT_INIT_LOG_LEVEL ( )

Get maximum log level pjproject was compiled with.

Determine the maximum log level the pjproject we are running with supports.

When pjproject is initially loaded the default log level in effect is the maximum log level the library was compiled to generate. We must save this value off somewhere before we change it to what we want to use as the default level.

Note
This must be done before calling pj_init() so the level we want to use as the default level is in effect while the library initializes.

Definition at line 167 of file options.h.

◆ DEFAULT_PJ_LOG_MAX_LEVEL

#define DEFAULT_PJ_LOG_MAX_LEVEL   2

Normal PJPROJECT active log level used by Asterisk.

These levels are usually mapped to Error and Warning Asterisk log levels which shouldn't normally be suppressed.

Definition at line 149 of file options.h.

◆ DEFAULT_PJPROJECT_CACHE_POOLS

#define DEFAULT_PJPROJECT_CACHE_POOLS   1

Definition at line 178 of file options.h.

◆ MAX_PJ_LOG_MAX_LEVEL

#define MAX_PJ_LOG_MAX_LEVEL   6

Maximum log level defined by PJPROJECT.

Definition at line 141 of file options.h.

Variable Documentation

◆ ast_defaultlanguage

char ast_defaultlanguage[]
extern

◆ ast_language_is_prefix

int ast_language_is_prefix
extern

The following variable controls the layout of localized sound files. If 0, use the historical layout with prefix just before the filename (i.e. digits/en/1.gsm , digits/it/1.gsm or default to digits/1.gsm), if 1 put the prefix at the beginning of the filename (i.e. en/digits/1.gsm, it/digits/1.gsm or default to digits/1.gsm). The latter permits a language to be entirely in one directory.

This is settable in asterisk.conf.

Definition at line 67 of file file.c.

Referenced by handle_show_settings(), load_asterisk_conf(), and main().

◆ ast_lastreloadtime

struct timeval ast_lastreloadtime
extern

◆ ast_mainpid

pid_t ast_mainpid
extern

Definition at line 315 of file asterisk.c.

Referenced by safe_append(), and scan_service().

◆ ast_startuptime

struct timeval ast_startuptime
extern

◆ record_cache_dir

char record_cache_dir[AST_CACHE_DIR_LEN]
extern

Definition at line 96 of file options.c.

Referenced by ast_writefile().