diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-01 21:10:07 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-01 21:10:07 +0000 |
commit | b1f91b97d2085cc845d0f57bd9907de50c995105 (patch) | |
tree | 9c836ac808552d20be6bd2baa3a3c29f642eda53 /apps/app_privacy.c | |
parent | c5d084051f21e943fcbcc347fc80b166885f298d (diff) |
Merge changes from team/group/appdocsxml
This commit introduces the first phase of an effort to manage documentation of the
interfaces in Asterisk in an XML format. Currently, a new format is available for
applications and dialplan functions. A good number of conversions to the new format
are also included.
For more information, see the following message to asterisk-dev:
http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153365 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_privacy.c')
-rw-r--r-- | apps/app_privacy.c | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/apps/app_privacy.c b/apps/app_privacy.c index 09f698861..71811de1c 100644 --- a/apps/app_privacy.c +++ b/apps/app_privacy.c @@ -41,25 +41,41 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/app.h" #include "asterisk/config.h" -static char *app = "PrivacyManager"; - -static char *synopsis = "Require phone number to be entered, if no CallerID sent"; +/*** DOCUMENTATION + <application name="PrivacyManager" language="en_US"> + <synopsis> + Require phone number to be entered, if no CallerID sent + </synopsis> + <syntax> + <parameter name="maxretries"> + <para>Total tries caller is allowed to input a callerid. Defaults to <literal>3</literal>.</para> + </parameter> + <parameter name="minlength"> + <para>Minimum allowable digits in the input callerid number. Defaults to <literal>10</literal>.</para> + </parameter> + <parameter name="context"> + <para>Context to check the given callerid against patterns.</para> + </parameter> + </syntax> + <description> + <para>If no Caller*ID is sent, PrivacyManager answers the channel and asks + the caller to enter their phone number. The caller is given + <replaceable>maxretries</replaceable> attempts to do so. The application does + <emphasis>nothing</emphasis> if Caller*ID was received on the channel.</para> + <para>The application sets the following channel variable upon completion:</para> + <variablelist> + <variable name="PRIVACYMGRSTATUS"> + <para>The status of the privacy manager's attempt to collect a phone number from the user.</para> + <value name="SUCCESS"/> + <value name="FAILED"/> + </variable> + </variablelist> + </description> + </application> + ***/ -static char *descrip = - " PrivacyManager([maxretries][,minlength][,context]): If no Caller*ID \n" - "is sent, PrivacyManager answers the channel and asks the caller to\n" - "enter their phone number. The caller is given 'maxretries' attempts to do so.\n" - "The application does nothing if Caller*ID was received on the channel.\n" - " maxretries default 3 -maximum number of attempts the caller is allowed \n" - " to input a callerid.\n" - " minlength default 10 -minimum allowable digits in the input callerid number.\n" - " context context to check the given Caller*ID against patterns.\n" - "The application sets the following channel variable upon completion: \n" - "PRIVACYMGRSTATUS The status of the privacy manager's attempt to collect \n" - " a phone number from the user. A text string that is either:\n" - " SUCCESS | FAILED \n" -; +static char *app = "PrivacyManager"; static int privacy_exec (struct ast_channel *chan, void *data) { @@ -178,7 +194,7 @@ static int unload_module(void) static int load_module(void) { - return ast_register_application(app, privacy_exec, synopsis, descrip); + return ast_register_application_xml(app, privacy_exec); } AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Require phone number to be entered, if no CallerID sent"); |