Wed Aug 15 01:24:26 2007

Asterisk developer's documentation


agi.h File Reference

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

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AGI
struct  agi_command

Functions

int ast_agi_register (agi_command *cmd)
void ast_agi_unregister (agi_command *cmd)


Detailed Description

AGI Extension interfaces - Asterisk Gateway Interface.

Definition in file agi.h.


Function Documentation

int ast_agi_register ( agi_command cmd  ) 

Definition at line 1666 of file res_agi.c.

01667 {
01668    int x;
01669    for (x=0; x<MAX_COMMANDS - 1; x++) {
01670       if (commands[x].cmda[0] == agi->cmda[0]) {
01671          ast_log(LOG_WARNING, "Command already registered!\n");
01672          return -1;
01673       }
01674    }
01675    for (x=0; x<MAX_COMMANDS - 1; x++) {
01676       if (!commands[x].cmda[0]) {
01677          commands[x] = *agi;
01678          return 0;
01679       }
01680    }
01681    ast_log(LOG_WARNING, "No more room for new commands!\n");
01682    return -1;
01683 }

void ast_agi_unregister ( agi_command cmd  ) 

Definition at line 1685 of file res_agi.c.

01686 {
01687    int x;
01688    for (x=0; x<MAX_COMMANDS - 1; x++) {
01689       if (commands[x].cmda[0] == agi->cmda[0]) {
01690          memset(&commands[x], 0, sizeof(agi_command));
01691       }
01692    }
01693 }


Generated on Wed Aug 15 01:24:26 2007 for Asterisk - the Open Source PBX by  doxygen 1.5.3