#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"
#include "pbx_functions.h"
Include dependency graph for pbx_functions.c:
Go to the source code of this file.
Functions | |
char * | description (void) |
Provides a description of the module. | |
char * | key () |
Returns the ASTERISK_GPL_KEY. | |
int | load_module (void) |
Initialize the module. | |
int | unload_module (void) |
Cleanup all module structures, sockets, etc. | |
int | usecount (void) |
Provides a usecount. | |
Variables | |
static char * | tdesc = "Builtin dialplan functions" |
Definition in file pbx_functions.c.
|
Provides a description of the module.
Definition at line 61 of file pbx_functions.c. References tdesc. 00062 { 00063 return tdesc; 00064 }
|
|
Returns the ASTERISK_GPL_KEY. This returns the ASTERISK_GPL_KEY, signifiying that you agree to the terms of the GPL stated in the ASTERISK_GPL_KEY. Your module will not load if it does not return the EXACT message:
char *key(void) { return ASTERISK_GPL_KEY; }
Definition at line 71 of file pbx_functions.c. References ASTERISK_GPL_KEY. 00072 { 00073 return ASTERISK_GPL_KEY; 00074 }
|
|
Initialize the module. Initialize the Agents module. This function is being called by Asterisk when loading the module. Among other thing it registers applications, cli commands and reads the cofiguration file.
Definition at line 50 of file pbx_functions.c. References ast_custom_function_register(), and builtins. 00051 { 00052 int x; 00053 00054 for (x = 0; x < (sizeof(builtins) / sizeof(builtins[0])); x++) { 00055 ast_custom_function_register(builtins[x]); 00056 } 00057 00058 return 0; 00059 }
|
|
Cleanup all module structures, sockets, etc. This is called at exit. Any registrations and memory allocations need to be unregistered and free'd here. Nothing else will do these for you (until exit).
Definition at line 39 of file pbx_functions.c. References ast_custom_function_unregister(), and builtins. 00040 { 00041 int x; 00042 00043 for (x = 0; x < (sizeof(builtins) / sizeof(builtins[0])); x++) { 00044 ast_custom_function_unregister(builtins[x]); 00045 } 00046 00047 return 0; 00048 }
|
|
Provides a usecount. This function will be called by various parts of asterisk. Basically, all it has to do is to return a usecount when called. You will need to maintain your usecount within the module somewhere. The usecount should be how many channels provided by this module are in use.
Definition at line 66 of file pbx_functions.c. 00067 {
00068 return 0;
00069 }
|
|
Definition at line 37 of file pbx_functions.c. |