Asterisk - The Open Source Telephony Project GIT-master-c7a8271
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
options.c
Go to the documentation of this file.
1/*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 2018, CFWare, LLC
5 *
6 * Corey Farrell <git@cfware.com>
7 *
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
13 *
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
17 */
18
19/*! \file
20 *
21 * \brief Symbols related to asterisk.conf options and paths.
22 *
23 * \author Corey Farrell <git@cfware.com>
24 */
25
26/*** MODULEINFO
27 <support_level>core</support_level>
28 ***/
29
30#include "asterisk.h"
31#include "asterisk/_private.h"
32#include "asterisk/app.h"
33#include "asterisk/config.h"
34#include "asterisk/logger.h"
35#include "asterisk/options.h"
36#include "asterisk/paths.h"
37#include "asterisk/pbx.h"
38#include "asterisk/rtp_engine.h"
39#include "asterisk/strings.h"
40#include "asterisk/utils.h"
41
42#include "../defaults.h"
43#include "channelstorage.h"
44
45#include <sys/time.h>
46#include <sys/resource.h>
47
48
49/*! Default minimum DTMF digit length - 80ms */
50#define AST_MIN_DTMF_DURATION 80
51
52#define DEFAULT_MONITOR_DIR DEFAULT_SPOOL_DIR "/monitor"
53#define DEFAULT_RECORDING_DIR DEFAULT_SPOOL_DIR "/recording"
54
55/*! \defgroup main_options Main Configuration Options
56 * \brief Main configuration options from asterisk.conf or OS command line on starting Asterisk.
57 * \arg \ref asterisk.conf "Config_ast"
58 * \note Some of them can be changed in the CLI
59 */
60/*! @{ */
61
63
64/*! Maximum active system verbosity level. */
66
67/*! Verbosity level */
69/*! Debug level */
71/*! Trace level */
73/*! Default to -1 to know if we have read the level from pjproject yet. */
77/*! Max load avg on system */
79/*! Max number of active calls */
81/*! Max number of open file handles (files, sockets) */
83/*! Minimum duration of DTMF. */
85#if defined(HAVE_SYSINFO)
86/*! Minimum amount of free system memory - stop accepting calls if free memory falls below this watermark */
88#endif
90unsigned int ast_option_rtpptdynamic = 35;
92/*! @} */
93
95
96/* XXX tmpdir is a subdir of the spool directory, and no way to remap it */
97char record_cache_dir[AST_CACHE_DIR_LEN] = DEFAULT_TMP_DIR;
98
100
114
122 char system_name[128];
127};
128
129static struct _cfg_paths cfg_paths = {
130 .cache_dir = DEFAULT_CACHE_DIR,
131 .config_dir = DEFAULT_CONFIG_DIR,
132 .module_dir = DEFAULT_MODULE_DIR,
133 .spool_dir = DEFAULT_SPOOL_DIR,
134 .monitor_dir = DEFAULT_MONITOR_DIR,
135 .recording_dir = DEFAULT_RECORDING_DIR,
136 .var_dir = DEFAULT_VAR_DIR,
137 .data_dir = DEFAULT_DATA_DIR,
138 .log_dir = DEFAULT_LOG_DIR,
139 .agi_dir = DEFAULT_AGI_DIR,
140 .run_dir = DEFAULT_RUN_DIR,
141 .key_dir = DEFAULT_KEY_DIR,
142
143 .config_file = DEFAULT_CONFIG_FILE,
144 .db_path = DEFAULT_DB,
145 .sbin_dir = DEFAULT_SBIN_DIR,
146 .pid_path = DEFAULT_PID,
147 .socket_path = DEFAULT_SOCKET,
148 .ctl_file = "asterisk.ctl",
149};
150
165
172
177
178/*! \brief Set maximum open files */
179static void set_ulimit(int value)
180{
181 struct rlimit l = {0, 0};
182
183 if (value <= 0) {
184 ast_log(LOG_WARNING, "Unable to change max files open to invalid value %i\n",value);
185 return;
186 }
187
188 l.rlim_cur = value;
189 l.rlim_max = value;
190
191 if (setrlimit(RLIMIT_NOFILE, &l)) {
192 ast_log(LOG_WARNING, "Unable to disable core size resource limit: %s\n",strerror(errno));
193 return;
194 }
195
196 ast_log(LOG_NOTICE, "Setting max files open to %d\n",value);
197
198 return;
199}
200
201void set_asterisk_conf_path(const char *path)
202{
204}
205
206void set_socket_path(const char *path)
207{
209}
210
212{
213 struct ast_config *cfg;
214 struct ast_variable *v;
215 char hostname[MAXHOSTNAMELEN] = "";
216 struct ast_flags config_flags = { CONFIG_FLAG_NOREALTIME };
217 struct {
218 unsigned int dbdir:1;
219 unsigned int keydir:1;
220 } found = { 0, 0 };
221 /* Default to false for security */
222 int live_dangerously = 0;
223 int option_debug_new = 0;
224 int option_trace_new = 0;
225 int option_verbose_new = 0;
226
227
228 /* init with buildtime config */
229#ifdef REF_DEBUG
230 /* The REF_DEBUG compiler flag is now only used to enable refdebug by default.
231 * Support for debugging reference counts is always compiled in. */
233#endif
234
236
237 cfg = ast_config_load2(ast_config_AST_CONFIG_FILE, "" /* core, can't reload */, config_flags);
238
239 /* If AST_OPT_FLAG_EXEC_INCLUDES was previously enabled with -X turn it off now.
240 * Using #exec from other configs requires that it be enabled from asterisk.conf. */
242
243 /* no asterisk.conf? no problem, use buildtime config! */
245 fprintf(stderr, "Unable to open specified master config file '%s', using built-in defaults\n", ast_config_AST_CONFIG_FILE);
246 return;
247 }
248
249 for (v = ast_variable_browse(cfg, "files"); v; v = v->next) {
250 if (!strcasecmp(v->name, "astctlpermissions")) {
252 } else if (!strcasecmp(v->name, "astctlowner")) {
254 } else if (!strcasecmp(v->name, "astctlgroup")) {
256 } else if (!strcasecmp(v->name, "astctl")) {
258 }
259 }
260
261 for (v = ast_variable_browse(cfg, "directories"); v; v = v->next) {
262 if (!strcasecmp(v->name, "astcachedir")) {
264 } else if (!strcasecmp(v->name, "astetcdir")) {
266 } else if (!strcasecmp(v->name, "astspooldir")) {
268 snprintf(cfg_paths.monitor_dir, sizeof(cfg_paths.monitor_dir), "%s/monitor", v->value);
269 snprintf(cfg_paths.recording_dir, sizeof(cfg_paths.recording_dir), "%s/recording", v->value);
270 } else if (!strcasecmp(v->name, "astvarlibdir")) {
272 if (!found.dbdir) {
273 snprintf(cfg_paths.db_path, sizeof(cfg_paths.db_path), "%s/astdb", v->value);
274 }
275 } else if (!strcasecmp(v->name, "astdbdir")) {
276 snprintf(cfg_paths.db_path, sizeof(cfg_paths.db_path), "%s/astdb", v->value);
277 found.dbdir = 1;
278 } else if (!strcasecmp(v->name, "astdatadir")) {
280 if (!found.keydir) {
281 snprintf(cfg_paths.key_dir, sizeof(cfg_paths.key_dir), "%s/keys", v->value);
282 }
283 } else if (!strcasecmp(v->name, "astkeydir")) {
284 snprintf(cfg_paths.key_dir, sizeof(cfg_paths.key_dir), "%s/keys", v->value);
285 found.keydir = 1;
286 } else if (!strcasecmp(v->name, "astlogdir")) {
288 } else if (!strcasecmp(v->name, "astagidir")) {
290 } else if (!strcasecmp(v->name, "astrundir")) {
291 snprintf(cfg_paths.pid_path, sizeof(cfg_paths.pid_path), "%s/%s", v->value, "asterisk.pid");
293 } else if (!strcasecmp(v->name, "astmoddir")) {
295 } else if (!strcasecmp(v->name, "astsbindir")) {
297 }
298 }
299
300 /* Combine astrundir and astctl settings. */
301 snprintf(cfg_paths.socket_path, sizeof(cfg_paths.socket_path), "%s/%s",
303
304 for (v = ast_variable_browse(cfg, "options"); v; v = v->next) {
305 /* verbose level (-v at startup) */
306 if (!strcasecmp(v->name, "verbose")) {
307 option_verbose_new = atoi(v->value);
308 /* whether or not to force timestamping in CLI verbose output. (-T at startup) */
309 } else if (!strcasecmp(v->name, "timestamp")) {
311 /* whether or not to support #exec in config files */
312 } else if (!strcasecmp(v->name, "execincludes")) {
314 /* debug level (-d at startup) */
315 } else if (!strcasecmp(v->name, "debug")) {
316 option_debug_new = 0;
317 if (sscanf(v->value, "%30d", &option_debug_new) != 1) {
318 option_debug_new = ast_true(v->value) ? 1 : 0;
319 }
320 } else if (!strcasecmp(v->name, "trace")) {
321 option_trace_new = 0;
322 if (sscanf(v->value, "%30d", &option_trace_new) != 1) {
323 option_trace_new = ast_true(v->value) ? 1 : 0;
324 }
325 } else if (!strcasecmp(v->name, "refdebug")) {
327#if HAVE_WORKING_FORK
328 /* Disable forking (-f at startup) */
329 } else if (!strcasecmp(v->name, "nofork")) {
331 /* Always fork, even if verbose or debug are enabled (-F at startup) */
332 } else if (!strcasecmp(v->name, "alwaysfork")) {
334#endif
335 /* Run quietly (-q at startup ) */
336 } else if (!strcasecmp(v->name, "quiet")) {
338 /* Run as console (-c at startup, implies nofork) */
339 } else if (!strcasecmp(v->name, "console")) {
340 if (!ast_opt_remote) {
342 }
343 /* Run with high priority if the O/S permits (-p at startup) */
344 } else if (!strcasecmp(v->name, "highpriority")) {
346 /* Initialize RSA auth keys (IAX2) (-i at startup) */
347 } else if (!strcasecmp(v->name, "initcrypto")) {
349 /* Disable ANSI colors for console (-c at startup) */
350 } else if (!strcasecmp(v->name, "nocolor")) {
352 /* Disable some usage warnings for picky people :p */
353 } else if (!strcasecmp(v->name, "dontwarn")) {
355 /* Dump core in case of crash (-g) */
356 } else if (!strcasecmp(v->name, "dumpcore")) {
358 /* Cache recorded sound files to another directory during recording */
359 } else if (!strcasecmp(v->name, "cache_record_files")) {
361#if !defined(LOW_MEMORY)
362 /* Cache media frames for performance */
363 } else if (!strcasecmp(v->name, "cache_media_frames")) {
365#endif
366 /* Specify cache directory */
367 } else if (!strcasecmp(v->name, "record_cache_dir")) {
369 /* Build transcode paths via SLINEAR, instead of directly */
370 } else if (!strcasecmp(v->name, "transcode_via_sln")) {
372 /* Transmit SLINEAR silence while a channel is being recorded or DTMF is being generated on a channel */
373 } else if (!strcasecmp(v->name, "transmit_silence_during_record") || !strcasecmp(v->name, "transmit_silence")) {
375 } else if (!strcasecmp(v->name, "mindtmfduration")) {
376 if (sscanf(v->value, "%30u", &option_dtmfminduration) != 1) {
378 }
379 } else if (!strcasecmp(v->name, "rtp_use_dynamic")) {
381 /* http://www.iana.org/assignments/rtp-parameters
382 * RTP dynamic payload types start at 96 normally; extend down to 0 */
383 } else if (!strcasecmp(v->name, "rtp_pt_dynamic")) {
386 } else if (!strcasecmp(v->name, "maxcalls")) {
387 if ((sscanf(v->value, "%30d", &ast_option_maxcalls) != 1) || (ast_option_maxcalls < 0)) {
389 }
390 } else if (!strcasecmp(v->name, "maxload")) {
391 double test[1];
392
393 if (getloadavg(test, 1) == -1) {
394 ast_log(LOG_ERROR, "Cannot obtain load average on this system. 'maxload' option disabled.\n");
395 ast_option_maxload = 0.0;
396 } else if ((sscanf(v->value, "%30lf", &ast_option_maxload) != 1) || (ast_option_maxload < 0.0)) {
397 ast_option_maxload = 0.0;
398 }
399 /* Set the maximum amount of open files */
400 } else if (!strcasecmp(v->name, "maxfiles")) {
401 ast_option_maxfiles = atoi(v->value);
402 if (!ast_opt_remote) {
404 }
405 /* What user to run as */
406 } else if (!strcasecmp(v->name, "runuser")) {
408 /* What group to run as */
409 } else if (!strcasecmp(v->name, "rungroup")) {
411 } else if (!strcasecmp(v->name, "systemname")) {
413 } else if (!strcasecmp(v->name, "autosystemname")) {
414 if (ast_true(v->value)) {
415 if (!gethostname(hostname, sizeof(hostname) - 1)) {
417 } else {
420 }
421 ast_log(LOG_ERROR, "Cannot obtain hostname for this system. Using '%s' instead.\n", ast_config_AST_SYSTEM_NAME);
422 }
423 }
424 } else if (!strcasecmp(v->name, "languageprefix")) {
426 } else if (!strcasecmp(v->name, "defaultlanguage")) {
428 } else if (!strcasecmp(v->name, "lockmode")) {
429 if (!strcasecmp(v->value, "lockfile")) {
431 } else if (!strcasecmp(v->value, "flock")) {
433 } else {
434 ast_log(LOG_WARNING, "'%s' is not a valid setting for the lockmode option, "
435 "defaulting to 'lockfile'\n", v->value);
437 }
438#if defined(HAVE_SYSINFO)
439 } else if (!strcasecmp(v->name, "minmemfree")) {
440 /* specify the minimum amount of free memory to retain. Asterisk should stop accepting new calls
441 * if the amount of free memory falls below this watermark */
442 if ((sscanf(v->value, "%30ld", &option_minmemfree) != 1) || (option_minmemfree < 0)) {
444 }
445#endif
446 } else if (!strcasecmp(v->name, "entityid")) {
447 struct ast_eid tmp_eid;
448 if (!ast_str_to_eid(&tmp_eid, v->value)) {
449 ast_eid_default = tmp_eid;
450 } else {
451 ast_log(LOG_WARNING, "Invalid Entity ID '%s' provided\n", v->value);
452 }
453 } else if (!strcasecmp(v->name, "lightbackground")) {
455 } else if (!strcasecmp(v->name, "forceblackbackground")) {
457 } else if (!strcasecmp(v->name, "hideconnect")) {
459 } else if (!strcasecmp(v->name, "lockconfdir")) {
461 } else if (!strcasecmp(v->name, "stdexten")) {
462 /* Choose how to invoke the extensions.conf stdexten */
463 if (!strcasecmp(v->value, "gosub")) {
465 } else if (!strcasecmp(v->value, "macro")) {
467 } else {
469 "'%s' is not a valid setting for the stdexten option, defaulting to 'gosub'\n",
470 v->value);
472 }
473 } else if (!strcasecmp(v->name, "live_dangerously")) {
475 } else if (!strcasecmp(v->name, "hide_messaging_ami_events")) {
477 } else if (!strcasecmp(v->name, "sounds_search_custom_dir")) {
479 } else if (!strcasecmp(v->name, "channel_storage_backend")) {
481 } else if (!strcasecmp(v->name, "disable_remote_console_shell")) {
483 }
484 }
485 if (!ast_opt_remote) {
488 }
489
490 option_debug += option_debug_new;
491 option_trace += option_trace_new;
492 option_verbose += option_verbose_new;
493
495}
Prototypes for public functions only of internal interest,.
int getloadavg(double *list, int nelem)
Asterisk main include file. File version handling, generic pbx functions.
#define DEFAULT_LANGUAGE
Definition: asterisk.h:46
#define PATH_MAX
Definition: asterisk.h:40
#define ast_log
Definition: astobj2.c:42
int internal_channel_set_current_storage_driver(const char *driver_name)
Definition: channel.c:7984
#define MAX_LANGUAGE
Definition: channel.h:174
static int live_dangerously
Set to true (non-zero) to globally allow all dangerous AMI actions to run.
Definition: manager.c:200
void astman_live_dangerously(int new_live_dangerously)
Enable/disable the inclusion of 'dangerous' configurations outside of the ast_config_AST_CONFIG_DIR.
Definition: manager.c:2447
int ast_option_rtpusedynamic
Definition: options.c:89
int ast_option_maxfiles
Definition: options.c:82
int option_debug
Definition: options.c:70
int ast_pjproject_max_log_level
Definition: options.c:74
int ast_verb_sys_level
Definition: options.c:65
int ast_option_maxcalls
Definition: options.c:80
int ast_option_disable_remote_console_shell
Definition: options.c:91
int ast_option_pjproject_log_level
Definition: options.c:75
double ast_option_maxload
Definition: options.c:78
unsigned int ast_option_rtpptdynamic
Definition: options.c:90
int option_verbose
Definition: options.c:68
struct ast_flags ast_options
Definition: options.c:62
unsigned int option_dtmfminduration
Definition: options.c:84
int ast_option_pjproject_cache_pools
Definition: options.c:76
long option_minmemfree
Definition: options.c:87
int option_trace
Definition: options.c:72
@ AST_OPT_FLAG_HIGH_PRIORITY
Definition: options.h:49
@ AST_OPT_FLAG_HIDE_MESSAGING_AMI_EVENTS
Definition: options.h:93
@ AST_OPT_FLAG_TRANSCODE_VIA_SLIN
Definition: options.h:61
@ AST_OPT_FLAG_HIDE_CONSOLE_CONNECT
Definition: options.h:97
@ AST_OPT_FLAG_EXEC_INCLUDES
Definition: options.h:41
@ AST_OPT_FLAG_NO_COLOR
Definition: options.h:57
@ AST_OPT_FLAG_NO_FORK
Definition: options.h:43
@ AST_OPT_FLAG_REF_DEBUG
Definition: options.h:81
@ AST_OPT_FLAG_TRANSMIT_SILENCE
Definition: options.h:75
@ AST_OPT_FLAG_ALWAYS_FORK
Definition: options.h:83
@ AST_OPT_FLAG_QUIET
Definition: options.h:45
@ AST_OPT_FLAG_STDEXTEN_MACRO
Definition: options.h:63
@ AST_OPT_FLAG_CACHE_MEDIA_FRAMES
Definition: options.h:71
@ AST_OPT_FLAG_TIMESTAMP
Definition: options.h:69
@ AST_OPT_FLAG_LOCK_CONFIG_DIR
Definition: options.h:99
@ AST_OPT_FLAG_CACHE_RECORD_FILES
Definition: options.h:67
@ AST_OPT_FLAG_INIT_KEYS
Definition: options.h:51
@ AST_OPT_FLAG_CONSOLE
Definition: options.h:47
@ AST_OPT_FLAG_DONT_WARN
Definition: options.h:77
@ AST_OPT_FLAG_FORCE_BLACK_BACKGROUND
Definition: options.h:95
@ AST_OPT_FLAG_LIGHT_BACKGROUND
Definition: options.h:91
@ AST_OPT_FLAG_DUMP_CORE
Definition: options.h:65
@ AST_OPT_FLAG_SOUNDS_SEARCH_CUSTOM
Definition: options.h:79
Application convenience functions, designed to give consistent look and feel to Asterisk apps.
@ AST_LOCK_TYPE_LOCKFILE
@ AST_LOCK_TYPE_FLOCK
void ast_set_lock_type(enum AST_LOCK_TYPE type)
Set the type of locks used by ast_lock_path()
Definition: main/app.c:2609
Configuration File Parser.
struct ast_config * ast_config_load2(const char *filename, const char *who_asked, struct ast_flags flags)
Load a config file.
Definition: main/config.c:3541
#define CONFIG_STATUS_FILEMISSING
@ CONFIG_FLAG_NOREALTIME
#define CONFIG_STATUS_FILEUNCHANGED
#define CONFIG_STATUS_FILEINVALID
int ast_parse_arg(const char *arg, enum ast_parse_flags flags, void *p_result,...)
The argument parsing routine.
Definition: main/config.c:4047
void ast_config_destroy(struct ast_config *cfg)
Destroys a config.
Definition: extconf.c:1289
struct ast_variable * ast_variable_browse(const struct ast_config *config, const char *category_name)
Definition: extconf.c:1215
Support for logging to various files, console and syslog Configuration in file logger....
#define LOG_ERROR
#define LOG_NOTICE
#define LOG_WARNING
static char hostname[MAXHOSTNAMELEN]
Definition: logger.c:116
int errno
#define MAXHOSTNAMELEN
Definition: network.h:69
const char * ast_config_AST_KEY_DIR
Definition: options.c:162
static struct _cfg_paths cfg_paths
Definition: options.c:129
char record_cache_dir[AST_CACHE_DIR_LEN]
Definition: options.c:97
#define AST_MIN_DTMF_DURATION
Definition: options.c:50
const char * ast_config_AST_CACHE_DIR
Definition: options.c:151
const char * ast_config_AST_RUN_GROUP
Definition: options.c:170
void load_asterisk_conf(void)
Definition: options.c:211
const char * ast_config_AST_SOCKET
Definition: options.c:168
#define DEFAULT_MONITOR_DIR
Definition: options.c:52
const char * ast_config_AST_RUN_USER
Definition: options.c:169
const char * ast_config_AST_CTL_PERMISSIONS
Definition: options.c:173
void set_asterisk_conf_path(const char *path)
Definition: options.c:201
const char * ast_config_AST_CTL_GROUP
Definition: options.c:175
const char * ast_config_AST_MODULE_DIR
Definition: options.c:154
const char * ast_config_AST_PID
Definition: options.c:167
const char * ast_config_AST_RUN_DIR
Definition: options.c:163
const char * ast_config_AST_DATA_DIR
Definition: options.c:159
const char * ast_config_AST_CONFIG_DIR
Definition: options.c:152
char ast_defaultlanguage[MAX_LANGUAGE]
Definition: options.c:99
const char * ast_config_AST_SPOOL_DIR
Definition: options.c:155
const char * ast_config_AST_AGI_DIR
Definition: options.c:161
#define DEFAULT_RECORDING_DIR
Definition: options.c:53
const char * ast_config_AST_VAR_DIR
Definition: options.c:158
const char * ast_config_AST_SYSTEM_NAME
Definition: options.c:171
const char * ast_config_AST_SBIN_DIR
Definition: options.c:164
struct ast_eid ast_eid_default
Global EID.
Definition: options.c:94
const char * ast_config_AST_CONFIG_FILE
Definition: options.c:153
void set_socket_path(const char *path)
Definition: options.c:206
const char * ast_config_AST_MONITOR_DIR
Definition: options.c:156
const char * ast_config_AST_LOG_DIR
Definition: options.c:160
static void set_ulimit(int value)
Set maximum open files.
Definition: options.c:179
const char * ast_config_AST_CTL
Definition: options.c:176
const char * ast_config_AST_CTL_OWNER
Definition: options.c:174
const char * ast_config_AST_DB
Definition: options.c:166
const char * ast_config_AST_RECORDING_DIR
Definition: options.c:157
Options provided by main asterisk program.
#define ast_opt_remote
Definition: options.h:115
int ast_language_is_prefix
The following variable controls the layout of localized sound files. If 0, use the historical layout ...
Definition: file.c:67
#define AST_CACHE_DIR_LEN
Definition: options.h:32
#define AST_DEFAULT_OPTIONS
Definition: options.h:107
Asterisk file paths, configured in asterisk.conf.
Core PBX routines and definitions.
void pbx_live_dangerously(int new_live_dangerously)
Enable/disable the execution of 'dangerous' functions from external protocols (AMI,...
Pluggable RTP Architecture.
#define AST_RTP_PT_FIRST_DYNAMIC
Definition: rtp_engine.h:92
String manipulation functions.
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true"....
Definition: utils.c:2199
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Definition: strings.h:65
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Definition: strings.h:425
char system_name[128]
Definition: options.c:122
char monitor_dir[PATH_MAX]
Definition: options.c:106
char ctl_perms[PATH_MAX]
Definition: options.c:123
char run_dir[PATH_MAX]
Definition: options.c:112
char config_dir[PATH_MAX]
Definition: options.c:103
char log_dir[PATH_MAX]
Definition: options.c:110
char key_dir[PATH_MAX]
Definition: options.c:113
char pid_path[PATH_MAX]
Definition: options.c:118
char sbin_dir[PATH_MAX]
Definition: options.c:117
char spool_dir[PATH_MAX]
Definition: options.c:105
char config_file[PATH_MAX]
Definition: options.c:115
char recording_dir[PATH_MAX]
Definition: options.c:107
char var_dir[PATH_MAX]
Definition: options.c:108
char ctl_group[PATH_MAX]
Definition: options.c:125
char run_group[PATH_MAX]
Definition: options.c:121
char data_dir[PATH_MAX]
Definition: options.c:109
char ctl_owner[PATH_MAX]
Definition: options.c:124
char socket_path[PATH_MAX]
Definition: options.c:119
char ctl_file[PATH_MAX]
Definition: options.c:126
char cache_dir[PATH_MAX]
Definition: options.c:102
char db_path[PATH_MAX]
Definition: options.c:116
char run_user[PATH_MAX]
Definition: options.c:120
char module_dir[PATH_MAX]
Definition: options.c:104
char agi_dir[PATH_MAX]
Definition: options.c:111
An Entity ID is essentially a MAC address, brief and unique.
Definition: utils.h:813
Structure used to handle boolean flags.
Definition: utils.h:199
Structure for variables, used for configurations and for channel variables.
struct ast_variable * next
int value
Definition: syslog.c:37
Utility functions.
void ast_set_default_eid(struct ast_eid *eid)
Fill in an ast_eid with the default eid of this machine.
Definition: utils.c:3001
#define ast_set2_flag(p, value, flag)
Definition: utils.h:94
#define ast_clear_flag(p, flag)
Definition: utils.h:77
#define ast_set_flag(p, flag)
Definition: utils.h:70
int ast_str_to_eid(struct ast_eid *eid, const char *s)
Convert a string into an EID.
Definition: utils.c:3077