diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-01 19:34:50 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-01 19:34:50 +0000 |
commit | 77f1ac1f1bb648f1c664c4ade40f675780d77ab6 (patch) | |
tree | ddf448e660b9d7ad460fe7d70c4b2764b52588f5 /doc | |
parent | abafbd959b487f611624ae173d7aa5973a110c54 (diff) |
add some notes regarding the distinction between applications and functions
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5542 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/CODING-GUIDELINES | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/doc/CODING-GUIDELINES b/doc/CODING-GUIDELINES index b9fcfba1e..f4eb9a19b 100755 --- a/doc/CODING-GUIDELINES +++ b/doc/CODING-GUIDELINES @@ -4,7 +4,13 @@ To be accepted into the codebase, all non-trivial changes must be disclaimed to Digium or placed in the public domain. For more information see http://bugs.digium.com -Patches should be in the form of a unified (-u) diff. +Patches should be in the form of a unified (-u) diff, made from the directory +above the top-level Asterisk source directory. For example: + +- the base code you are working from is in ~/work/asterisk-base +- the changes are in ~/work/asterisk-new + +~/work$ diff -urN asterisk-base asterisk-new All code, filenames, function names and comments must be in ENGLISH. @@ -168,3 +174,21 @@ and then any parameters that the command needs. For example: not *CLI> show iax2 peer <peername> + +== New dialplan applications/functions == + +There are two methods of adding functionality to the Asterisk +dialplan: applications and functions. Applications (found generally in +the apps/ directory) should be collections of code that interact with +a channel and/or user in some significant way. Functions (which can be +provided by any type of module) are used when the provided +functionality is simple... getting/retrieving a value, for +example. Functions should also be used when the operation is in no way +related to a channel (a computation or string operation, for example). + +Applications are registered and invoked using the +ast_register_application function; see the apps/app_skel.c file for an +example. + +Functions are registered using 'struct ast_custom_function_obj' +structures and the ast_custom_function_register function. |