Asterisk - The Open Source Telephony Project  18.5.0
Data Structures | Typedefs | Functions
agi.h File Reference

AGI Extension interfaces - Asterisk Gateway Interface. More...

#include "asterisk/cli.h"
#include "asterisk/xmldoc.h"
#include "asterisk/optional_api.h"
Include dependency graph for agi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  agi_command
 
struct  agi_state
 

Typedefs

typedef struct agi_state AGI
 
typedef struct agi_command agi_command
 

Functions

static void __dtor__ast_agi_register (void)
 
static void __dtor__ast_agi_register_multiple (void)
 
static void __dtor__ast_agi_send (void)
 
static void __dtor__ast_agi_unregister (void)
 
static void __dtor__ast_agi_unregister_multiple (void)
 
static void __init__ast_agi_register (void)
 
static void __init__ast_agi_register_multiple (void)
 
static void __init__ast_agi_send (void)
 
static void __init__ast_agi_unregister (void)
 
static void __init__ast_agi_unregister_multiple (void)
 
static int __stub__ast_agi_register (struct ast_module *mod, agi_command *cmd)
 Registers an AGI command. More...
 
static int __stub__ast_agi_register_multiple (struct ast_module *mod, struct agi_command *cmd, unsigned int len)
 Registers a group of AGI commands, provided as an array of struct agi_command entries. More...
 
static int __stub__ast_agi_send (int fd, struct ast_channel *chan, char *fmt,...)
 Sends a string of text to an application connected via AGI. More...
 
static int __stub__ast_agi_unregister (agi_command *cmd)
 Unregisters an AGI command. More...
 
static int __stub__ast_agi_unregister_multiple (struct agi_command *cmd, unsigned int len)
 Unregisters a group of AGI commands, provided as an array of struct agi_command entries. More...
 
static typeof (__stub__ast_agi_register) *ast_agi_register
 
static typeof (__stub__ast_agi_unregister) *ast_agi_unregister
 
static typeof (__stub__ast_agi_register_multiple) *ast_agi_register_multiple
 
static typeof (__stub__ast_agi_unregister_multiple) *ast_agi_unregister_multiple
 
static typeof (__stub__ast_agi_send) *ast_agi_send
 

Detailed Description

AGI Extension interfaces - Asterisk Gateway Interface.

Definition in file agi.h.

Typedef Documentation

◆ AGI

typedef struct agi_state AGI

◆ agi_command

typedef struct agi_command agi_command

Function Documentation

◆ __dtor__ast_agi_register()

static void __dtor__ast_agi_register ( void  )
static

Definition at line 78 of file agi.h.

78 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __dtor__ast_agi_register_multiple()

static void __dtor__ast_agi_register_multiple ( void  )
static

Definition at line 110 of file agi.h.

110 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __dtor__ast_agi_send()

static void __dtor__ast_agi_send ( void  )
static

Definition at line 142 of file agi.h.

142 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __dtor__ast_agi_unregister()

static void __dtor__ast_agi_unregister ( void  )
static

Definition at line 91 of file agi.h.

91 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __dtor__ast_agi_unregister_multiple()

static void __dtor__ast_agi_unregister_multiple ( void  )
static

Definition at line 127 of file agi.h.

127 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __init__ast_agi_register()

static void __init__ast_agi_register ( void  )
static

Definition at line 78 of file agi.h.

78 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __init__ast_agi_register_multiple()

static void __init__ast_agi_register_multiple ( void  )
static

Definition at line 110 of file agi.h.

110 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __init__ast_agi_send()

static void __init__ast_agi_send ( void  )
static

Definition at line 142 of file agi.h.

142 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __init__ast_agi_unregister()

static void __init__ast_agi_unregister ( void  )
static

Definition at line 91 of file agi.h.

91 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __init__ast_agi_unregister_multiple()

static void __init__ast_agi_unregister_multiple ( void  )
static

Definition at line 127 of file agi.h.

127 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __stub__ast_agi_register()

static int __stub__ast_agi_register ( struct ast_module mod,
agi_command cmd 
)
static

Registers an AGI command.

Parameters
modPointer to the module_info structure for the module that is registering the command
cmdPointer to the descriptor for the command
Return values
1on success
0the command is already registered
AST_OPTIONAL_API_UNAVAILABLEthe module is not loaded.

Definition at line 78 of file agi.h.

References ast_agi_unregister(), AST_OPTIONAL_API, and AST_OPTIONAL_API_UNAVAILABLE.

78 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __stub__ast_agi_register_multiple()

static int __stub__ast_agi_register_multiple ( struct ast_module mod,
struct agi_command cmd,
unsigned int  len 
)
static

Registers a group of AGI commands, provided as an array of struct agi_command entries.

Parameters
modPointer to the module_info structure for the module that is registering the commands
cmdPointer to the first entry in the array of command descriptors
lenLength of the array (use the ARRAY_LEN macro to determine this easily)
Returns
0 on success, -1 on failure, AST_OPTIONAL_API_UNAVAILABLE if res_agi is not loaded
Note
If any command fails to register, all commands previously registered during the operation will be unregistered. In other words, this function registers all the provided commands, or none of them.

Definition at line 110 of file agi.h.

References ast_agi_unregister_multiple(), AST_OPTIONAL_API, and AST_OPTIONAL_API_UNAVAILABLE.

110 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __stub__ast_agi_send()

static int __stub__ast_agi_send ( int  fd,
struct ast_channel chan,
char *  fmt,
  ... 
)
static

Sends a string of text to an application connected via AGI.

Parameters
fdThe file descriptor for the AGI session (from struct agi_state)
chanPointer to an associated Asterisk channel, if any
fmtprintf-style format string
Returns
0 for success, -1 for failure, AST_OPTIONAL_API_UNAVAILABLE if res_agi is not loaded

Definition at line 142 of file agi.h.

References AST_OPTIONAL_API_UNAVAILABLE.

142 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __stub__ast_agi_unregister()

static int __stub__ast_agi_unregister ( agi_command cmd)
static

Unregisters an AGI command.

Parameters
cmdPointer to the descriptor for the command
Returns
1 on success, 0 if the command was not already registered

Definition at line 91 of file agi.h.

References ast_agi_register_multiple(), AST_OPTIONAL_API, AST_OPTIONAL_API_UNAVAILABLE, and len().

91 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ __stub__ast_agi_unregister_multiple()

static int __stub__ast_agi_unregister_multiple ( struct agi_command cmd,
unsigned int  len 
)
static

Unregisters a group of AGI commands, provided as an array of struct agi_command entries.

Parameters
cmdPointer to the first entry in the array of command descriptors
lenLength of the array (use the ARRAY_LEN macro to determine this easily)
Returns
0 on success, -1 on failure, AST_OPTIONAL_API_UNAVAILABLE if res_agi is not loaded
Note
If any command fails to unregister, this function will continue to unregister the remaining commands in the array; it will not reregister the already-unregistered commands.

Definition at line 127 of file agi.h.

References ast_agi_send(), AST_OPTIONAL_API_ATTR, AST_OPTIONAL_API_UNAVAILABLE, agi_state::fd, and format.

127 { return AST_OPTIONAL_API_UNAVAILABLE; });
#define AST_OPTIONAL_API_UNAVAILABLE
A common value for optional API stub functions to return.
Definition: optional_api.h:74

◆ typeof() [1/5]

static typeof ( __stub__ast_agi_register  )
static

◆ typeof() [2/5]

static typeof ( __stub__ast_agi_unregister  )
static

◆ typeof() [3/5]

static typeof ( __stub__ast_agi_register_multiple  )
static

◆ typeof() [4/5]

static typeof ( __stub__ast_agi_unregister_multiple  )
static

◆ typeof() [5/5]

static typeof ( __stub__ast_agi_send  )
static