1999-10-27 00:56:38 +00:00
|
|
|
/*
|
2005-08-30 18:32:10 +00:00
|
|
|
* Asterisk -- An open source telephony toolkit.
|
1999-10-27 00:56:38 +00:00
|
|
|
*
|
2005-08-30 18:32:10 +00:00
|
|
|
* Copyright (C) 1999 - 2005, Digium, Inc.
|
|
|
|
*
|
|
|
|
* Mark Spencer <markster@digium.com>
|
1999-10-27 00:56:38 +00:00
|
|
|
*
|
2005-08-30 18:32:10 +00:00
|
|
|
* See http://www.asterisk.org for more information about
|
|
|
|
* the Asterisk project. Please do not directly contact
|
|
|
|
* any of the maintainers of this project for assistance;
|
|
|
|
* the project provides a web site, mailing lists and IRC
|
|
|
|
* channels for your use.
|
1999-10-27 00:56:38 +00:00
|
|
|
*
|
|
|
|
* This program is free software, distributed under the terms of
|
2005-08-30 18:32:10 +00:00
|
|
|
* the GNU General Public License Version 2. See the LICENSE file
|
|
|
|
* at the top of the source tree.
|
|
|
|
*/
|
|
|
|
|
2005-10-24 20:12:06 +00:00
|
|
|
/*! \file
|
|
|
|
* \brief Options provided by main asterisk program
|
1999-10-27 00:56:38 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ASTERISK_OPTIONS_H
|
|
|
|
#define _ASTERISK_OPTIONS_H
|
|
|
|
|
|
|
|
#if defined(__cplusplus) || defined(c_plusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-12-04 20:40:46 +00:00
|
|
|
#define AST_CACHE_DIR_LEN 512
|
2005-03-05 04:04:55 +00:00
|
|
|
#define AST_FILENAME_MAX 80
|
2004-09-07 01:49:08 +00:00
|
|
|
|
2005-12-31 19:45:30 +00:00
|
|
|
/*! \ingroup main_options */
|
2005-12-04 20:40:46 +00:00
|
|
|
enum ast_option_flags {
|
|
|
|
/*! Allow \#exec in config files */
|
|
|
|
AST_OPT_FLAG_EXEC_INCLUDES = (1 << 0),
|
|
|
|
/*! Do not fork() */
|
|
|
|
AST_OPT_FLAG_NO_FORK = (1 << 1),
|
|
|
|
/*! Keep quiet */
|
|
|
|
AST_OPT_FLAG_QUIET = (1 << 2),
|
|
|
|
/*! Console mode */
|
|
|
|
AST_OPT_FLAG_CONSOLE = (1 << 3),
|
|
|
|
/*! Run in realtime Linux priority */
|
|
|
|
AST_OPT_FLAG_HIGH_PRIORITY = (1 << 4),
|
|
|
|
/*! Initialize keys for RSA authentication */
|
|
|
|
AST_OPT_FLAG_INIT_KEYS = (1 << 5),
|
|
|
|
/*! Remote console */
|
|
|
|
AST_OPT_FLAG_REMOTE = (1 << 6),
|
|
|
|
/*! Execute an asterisk CLI command upon startup */
|
|
|
|
AST_OPT_FLAG_EXEC = (1 << 7),
|
|
|
|
/*! Don't use termcap colors */
|
|
|
|
AST_OPT_FLAG_NO_COLOR = (1 << 8),
|
|
|
|
/*! Are we fully started yet? */
|
|
|
|
AST_OPT_FLAG_FULLY_BOOTED = (1 << 9),
|
|
|
|
/*! Trascode via signed linear */
|
|
|
|
AST_OPT_FLAG_TRANSCODE_VIA_SLIN = (1 << 10),
|
|
|
|
/*! Enable priority jumping in applications */
|
|
|
|
AST_OPT_FLAG_PRIORITY_JUMPING = (1 << 11),
|
|
|
|
/*! Dump core on a seg fault */
|
|
|
|
AST_OPT_FLAG_DUMP_CORE = (1 << 12),
|
|
|
|
/*! Cache sound files */
|
|
|
|
AST_OPT_FLAG_CACHE_RECORD_FILES = (1 << 13),
|
2006-07-28 19:17:56 +00:00
|
|
|
/*! Display timestamp in CLI verbose output */
|
2005-12-04 20:40:46 +00:00
|
|
|
AST_OPT_FLAG_TIMESTAMP = (1 << 14),
|
|
|
|
/*! Override config */
|
|
|
|
AST_OPT_FLAG_OVERRIDE_CONFIG = (1 << 15),
|
|
|
|
/*! Reconnect */
|
|
|
|
AST_OPT_FLAG_RECONNECT = (1 << 16),
|
|
|
|
/*! Transmit Silence during Record() */
|
|
|
|
AST_OPT_FLAG_TRANSMIT_SILENCE = (1 << 17),
|
|
|
|
/*! Suppress some warnings */
|
2006-03-14 16:49:34 +00:00
|
|
|
AST_OPT_FLAG_DONT_WARN = (1 << 18),
|
|
|
|
/*! End CDRs before the 'h' extension */
|
2006-04-30 14:55:05 +00:00
|
|
|
AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN = (1 << 19),
|
2006-03-30 06:26:16 +00:00
|
|
|
/*! Use Zaptel Timing for generators if available */
|
2006-04-30 14:55:05 +00:00
|
|
|
AST_OPT_FLAG_INTERNAL_TIMING = (1 << 20),
|
|
|
|
/*! Always fork, even if verbose or debug settings are non-zero */
|
|
|
|
AST_OPT_FLAG_ALWAYS_FORK = (1 << 21),
|
2006-05-26 21:47:52 +00:00
|
|
|
/*! Disable log/verbose output to remote consoles */
|
|
|
|
AST_OPT_FLAG_MUTE = (1 << 22)
|
2005-12-04 20:40:46 +00:00
|
|
|
};
|
|
|
|
|
2006-03-14 16:57:35 +00:00
|
|
|
/*! These are the options that set by default when Asterisk starts */
|
|
|
|
#define AST_DEFAULT_OPTIONS AST_OPT_FLAG_TRANSCODE_VIA_SLIN
|
|
|
|
|
2005-12-04 20:40:46 +00:00
|
|
|
#define ast_opt_exec_includes ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC_INCLUDES)
|
|
|
|
#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_console ast_test_flag(&ast_options, AST_OPT_FLAG_CONSOLE)
|
|
|
|
#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_remote ast_test_flag(&ast_options, AST_OPT_FLAG_REMOTE)
|
|
|
|
#define ast_opt_exec ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC)
|
|
|
|
#define ast_opt_no_color ast_test_flag(&ast_options, AST_OPT_FLAG_NO_COLOR)
|
|
|
|
#define ast_fully_booted ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)
|
|
|
|
#define ast_opt_transcode_via_slin ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSCODE_VIA_SLIN)
|
|
|
|
#define ast_opt_priority_jumping ast_test_flag(&ast_options, AST_OPT_FLAG_PRIORITY_JUMPING)
|
|
|
|
#define ast_opt_dump_core ast_test_flag(&ast_options, AST_OPT_FLAG_DUMP_CORE)
|
|
|
|
#define ast_opt_cache_record_files ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES)
|
|
|
|
#define ast_opt_timestamp ast_test_flag(&ast_options, AST_OPT_FLAG_TIMESTAMP)
|
|
|
|
#define ast_opt_override_config ast_test_flag(&ast_options, AST_OPT_FLAG_OVERRIDE_CONFIG)
|
|
|
|
#define ast_opt_reconnect ast_test_flag(&ast_options, AST_OPT_FLAG_RECONNECT)
|
|
|
|
#define ast_opt_transmit_silence ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSMIT_SILENCE)
|
|
|
|
#define ast_opt_dont_warn ast_test_flag(&ast_options, AST_OPT_FLAG_DONT_WARN)
|
2006-04-30 14:55:05 +00:00
|
|
|
#define ast_opt_end_cdr_before_h_exten ast_test_flag(&ast_options, AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN)
|
2006-03-30 06:26:16 +00:00
|
|
|
#define ast_opt_internal_timing ast_test_flag(&ast_options, AST_OPT_FLAG_INTERNAL_TIMING)
|
2006-04-30 14:55:05 +00:00
|
|
|
#define ast_opt_always_fork ast_test_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK)
|
2006-05-26 21:47:52 +00:00
|
|
|
#define ast_opt_mute ast_test_flag(&ast_options, AST_OPT_FLAG_MUTE)
|
2005-12-04 20:40:46 +00:00
|
|
|
|
|
|
|
extern struct ast_flags ast_options;
|
|
|
|
|
1999-10-27 00:56:38 +00:00
|
|
|
extern int option_verbose;
|
2006-03-30 06:07:04 +00:00
|
|
|
extern int option_debug; /*!< Debugging */
|
|
|
|
extern int option_maxcalls; /*!< Maximum number of simultaneous channels */
|
2005-10-26 03:58:32 +00:00
|
|
|
extern double option_maxload;
|
2000-01-09 19:58:18 +00:00
|
|
|
extern char defaultlanguage[];
|
2005-12-04 20:40:46 +00:00
|
|
|
|
2003-05-02 15:37:34 +00:00
|
|
|
extern time_t ast_startuptime;
|
|
|
|
extern time_t ast_lastreloadtime;
|
2006-05-08 12:32:44 +00:00
|
|
|
extern pid_t ast_mainpid;
|
2005-12-04 20:40:46 +00:00
|
|
|
|
2004-09-07 01:49:08 +00:00
|
|
|
extern char record_cache_dir[AST_CACHE_DIR_LEN];
|
2005-03-05 04:04:55 +00:00
|
|
|
extern char debug_filename[AST_FILENAME_MAX];
|
1999-10-27 00:56:38 +00:00
|
|
|
|
2006-12-27 21:08:30 +00:00
|
|
|
extern int ast_language_is_prefix;
|
|
|
|
|
1999-10-27 00:56:38 +00:00
|
|
|
#if defined(__cplusplus) || defined(c_plusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-08-30 18:32:10 +00:00
|
|
|
#endif /* _ASTERISK_OPTIONS_H */
|