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_transfer.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_transfer.c')
-rw-r--r-- | apps/app_transfer.c | 51 |
1 files changed, 36 insertions, 15 deletions
diff --git a/apps/app_transfer.c b/apps/app_transfer.c index df0c5392b..e1452bb59 100644 --- a/apps/app_transfer.c +++ b/apps/app_transfer.c @@ -36,23 +36,44 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/app.h" #include "asterisk/channel.h" +/*** DOCUMENTATION + <application name="Transfer" language="en_US"> + <synopsis> + Transfer caller to remote extension. + </synopsis> + <syntax> + <parameter name="dest" required="true" argsep="/"> + <argument name="Tech" /> + <argument name="destination" required="true" /> + </parameter> + </syntax> + <description> + <para>Requests the remote caller be transferred + to a given destination. If TECH (SIP, IAX2, LOCAL etc) is used, only + an incoming call with the same channel technology will be transfered. + Note that for SIP, if you transfer before call is setup, a 302 redirect + SIP message will be returned to the caller.</para> + <para>The result of the application will be reported in the <variable>TRANSFERSTATUS</variable> + channel variable:</para> + <variablelist> + <variable name="TRANSFERSTATUS"> + <value name="SUCCESS"> + Transfer succeeded. + </value> + <value name="FAILURE"> + Transfer failed. + </value> + <value name="UNSUPPORTED"> + Transfer unsupported by channel driver. + </value> + </variable> + </variablelist> + </description> + </application> + ***/ static const char *app = "Transfer"; -static const char *synopsis = "Transfer caller to remote extension"; - -static const char *descrip = -" Transfer([Tech/]dest): Requests the remote caller be transferred\n" -"to a given destination. If TECH (SIP, IAX2, LOCAL etc) is used, only\n" -"an incoming call with the same channel technology will be transfered.\n" -"Note that for SIP, if you transfer before call is setup, a 302 redirect\n" -"SIP message will be returned to the caller.\n" -"\nThe result of the application will be reported in the TRANSFERSTATUS\n" -"channel variable:\n" -" SUCCESS Transfer succeeded\n" -" FAILURE Transfer failed\n" -" UNSUPPORTED Transfer unsupported by channel driver\n"; - static int transfer_exec(struct ast_channel *chan, void *data) { int res; @@ -115,7 +136,7 @@ static int unload_module(void) static int load_module(void) { - return ast_register_application(app, transfer_exec, synopsis, descrip); + return ast_register_application_xml(app, transfer_exec); } AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Transfers a caller to another extension"); |