2 * Asterisk -- A telephony toolkit for Linux.
4 * External call management support
6 * Copyright (C) 1999, Mark Spencer
8 * Mark Spencer <markster@linux-support.net>
10 * This program is free software, distributed under the terms of
11 * the GNU General Public License.
13 * Includes code and algorithms from the Zapata library.
17 #ifndef _ASTERISK_MANAGER_H
18 #define _ASTERISK_MANAGER_H
23 * Call management packages are text fields of the form a: b. There is
24 * always exactly one space after the colon.
26 * The first header type is the "Event" header. Other headers vary from
27 * event to event. Headers end with standard \r\n termination.
29 * Some standard headers:
31 * Action: <action> -- request or notification of a particular action
32 * Response: <response> -- response code, like "200 OK"
36 #define DEFAULT_MANAGER_PORT 5038 /* Default port for Asterisk management via TCP */
38 #define EVENT_FLAG_SYSTEM (1 << 0) /* System events such as module load/unload */
39 #define EVENT_FLAG_CALL (1 << 1) /* Call event, such as state change, etc */
40 #define EVENT_FLAG_LOG (1 << 2) /* Log events */
41 #define EVENT_FLAG_VERBOSE (1 << 3) /* Verbose messages */
42 #define EVENT_FLAG_COMMAND (1 << 4) /* Ability to read/set commands */
43 #define EVENT_FLAG_AGENT (1 << 5) /* Ability to read/set agent info */
45 /* External routines may send asterisk manager events this way */
46 extern int manager_event(int category, char *event, char *contents, ...)
47 __attribute__ ((format (printf, 3,4)));
49 /* Called by Asterisk initialization */
50 extern int init_manager(void);
51 extern int reload_manager(void);