Mon Mar 20 08:20:14 2006

Asterisk developer's documentation


Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

agi.h File Reference

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

Go to the source code of this file.

Data Structures

struct  agi_command
struct  agi_state

Typedefs

typedef agi_state AGI
typedef agi_command agi_command

Functions

int agi_register (agi_command *cmd)
void agi_unregister (agi_command *cmd)


Detailed Description

AGI Extension interfaces - Asterisk Gateway Interface.

Definition in file agi.h.


Typedef Documentation

typedef struct agi_state AGI
 

Referenced by agi_exec_full(), agi_handle_command(), handle_answer(), handle_autohangup(), handle_channelstatus(), handle_controlstreamfile(), handle_dbdel(), handle_dbdeltree(), handle_dbget(), handle_dbput(), handle_exec(), handle_getdata(), handle_getoption(), handle_getvariable(), handle_getvariablefull(), handle_hangup(), handle_noop(), handle_recordfile(), handle_recvchar(), handle_recvtext(), handle_sayalpha(), handle_saydate(), handle_saydatetime(), handle_saydigits(), handle_saynumber(), handle_sayphonetic(), handle_saytime(), handle_sendimage(), handle_sendtext(), handle_setcallerid(), handle_setcontext(), handle_setextension(), handle_setmusic(), handle_setpriority(), handle_setvariable(), handle_streamfile(), handle_tddmode(), handle_verbose(), handle_waitfordigit(), and run_agi().

typedef struct agi_command agi_command
 


Function Documentation

int agi_register agi_command cmd  ) 
 

Definition at line 1686 of file res_agi.c.

References ast_log(), agi_command::cmda, commands, LOG_WARNING, and MAX_COMMANDS.

01687 {
01688    int x;
01689    for (x=0; x<MAX_COMMANDS - 1; x++) {
01690       if (commands[x].cmda[0] == agi->cmda[0]) {
01691          ast_log(LOG_WARNING, "Command already registered!\n");
01692          return -1;
01693       }
01694    }
01695    for (x=0; x<MAX_COMMANDS - 1; x++) {
01696       if (!commands[x].cmda[0]) {
01697          commands[x] = *agi;
01698          return 0;
01699       }
01700    }
01701    ast_log(LOG_WARNING, "No more room for new commands!\n");
01702    return -1;
01703 }

void agi_unregister agi_command cmd  ) 
 

Definition at line 1705 of file res_agi.c.

References agi_command::cmda, commands, and MAX_COMMANDS.

01706 {
01707    int x;
01708    for (x=0; x<MAX_COMMANDS - 1; x++) {
01709       if (commands[x].cmda[0] == agi->cmda[0]) {
01710          memset(&commands[x], 0, sizeof(agi_command));
01711       }
01712    }
01713 }


Generated on Mon Mar 20 08:20:14 2006 for Asterisk - the Open Source PBX by  doxygen 1.3.9.1