diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-09-02 15:20:28 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-09-02 15:20:28 +0000 |
commit | bf3b17af69e47cde03441f1978bbe2d176640380 (patch) | |
tree | 7a0139bcb57ef79c83e9f6ff3d213fe2b19505c9 /include | |
parent | 8c50ad022029aa0458b552949942998754486603 (diff) |
Version 0.2.0 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@512 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-x | include/asterisk/manager.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h new file mode 100755 index 000000000..5eb4965d5 --- /dev/null +++ b/include/asterisk/manager.h @@ -0,0 +1,52 @@ +/* + * Asterisk -- A telephony toolkit for Linux. + * + * External call management support + * + * Copyright (C) 1999, Mark Spencer + * + * Mark Spencer <markster@linux-support.net> + * + * This program is free software, distributed under the terms of + * the GNU General Public License. + * + * Includes code and algorithms from the Zapata library. + * + */ + +#ifndef _ASTERISK_MANAGER_H +#define _ASTERISK_MANAGER_H + +#include <stdarg.h> + +/* + * Call management packages are text fields of the form a: b. There is + * always exactly one space after the colon. + * + * The first header type is the "Event" header. Other headers vary from + * event to event. Headers end with standard \r\n termination. + * + * Some standard headers: + * + * Action: <action> -- request or notification of a particular action + * Response: <response> -- response code, like "200 OK" + * + */ + +#define DEFAULT_MANAGER_PORT 5038 /* Default port for Asterisk management via TCP */ + +#define EVENT_FLAG_SYSTEM (1 << 0) /* System events such as module load/unload */ +#define EVENT_FLAG_CALL (1 << 1) /* Call event, such as state change, etc */ +#define EVENT_FLAG_LOG (1 << 2) /* Log events */ +#define EVENT_FLAG_VERBOSE (1 << 3) /* Verbose messages */ +#define EVENT_FLAG_COMMAND (1 << 4) /* Ability to read/set commands */ +#define EVENT_FLAG_AGENT (1 << 5) /* Ability to read/set agent info */ + +/* External routines may send asterisk manager events this way */ +extern int manager_event(int category, char *event, char *contents, ...) + __attribute__ ((format (printf, 3,4))); + +/* Called by Asterisk initialization */ +extern int init_manager(void); +extern int reload_manager(void); +#endif |