2 * Asterisk -- An open source telephony toolkit.
4 * Copyright (C) 1999 - 2005, Digium, Inc.
6 * Mark Spencer <markster@digium.com>
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.
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.
20 * \brief AGI Extension interfaces - Asterisk Gateway Interface
23 #ifndef _ASTERISK_AGI_H
24 #define _ASTERISK_AGI_H
26 #if defined(__cplusplus) || defined(c_plusplus)
30 typedef struct agi_state
{
31 int fd
; /* FD for general output */
32 int audio
; /* FD for audio output */
33 int ctrl
; /* FD for input control */
34 unsigned int fast
:1; /* flag for fast agi or not */
37 typedef struct agi_command
{
38 /* Null terminated list of the words of the command */
39 char *cmda
[AST_MAX_CMD_LEN
];
40 /* Handler for the command (channel, AGI state, # of arguments, argument list).
41 Returns RESULT_SHOWUSAGE for improper arguments */
42 int (*handler
)(struct ast_channel
*chan
, AGI
*agi
, int argc
, char *argv
[]);
43 /* Summary of the command (< 60 characters) */
45 /* Detailed usage information */
47 struct agi_command
*next
;
50 int ast_agi_register(agi_command
*cmd
);
51 void ast_agi_unregister(agi_command
*cmd
);
53 #if defined(__cplusplus) || defined(c_plusplus)
57 #endif /* _ASTERISK_AGI_H */