From: Eliel C. Sardanons Date: Mon, 8 Dec 2008 03:35:55 +0000 (+0000) Subject: Add voicemail related applications and functions XML documentation: X-Git-Tag: 1.6.2.0-beta1~705 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5e9dc5e1f3f7c212cafb60f19704a264bd34e0d9;p=thirdparty%2Fasterisk.git Add voicemail related applications and functions XML documentation: applications: - VoiceMail() - VoiceMailMain() - MailboxExists() - VMAuthenticate() functions: - MAILBOX_EXISTS() git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161604 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 47f1a8411d..9028a82036 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -117,6 +117,187 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/res_odbc.h" #endif +/*** DOCUMENTATION + + + Leave a Voicemail message. + + + + + + + + + + + + + + + + + + + + + + + + + + This application allows the calling party to leave a message for the specified + list of mailboxes. When multiple mailboxes are specified, the greeting will be taken from + the first mailbox specified. Dialplan execution will stop if the specified mailbox does not + exist. + The Voicemail application will exit if any of the following DTMF digits are received: + + + Jump to the o extension in the current dialplan context. + + + Jump to the a extension in the current dialplan context. + + + This application will set the following channel variable upon completion: + + + This indicates the status of the execution of the VoiceMail application. + + + + + + + + + + Check Voicemail messages. + + + + + + + + + + + + + + + + + This application allows the calling party to check voicemail messages. A specific + mailbox, and optional corresponding context, + may be specified. If a mailbox is not provided, the calling party will + be prompted to enter one. If a context is not specified, the + default context will be used. + + + + + Check to see if Voicemail mailbox exists. + + + + + + + + None options. + + + + Check to see if the specified mailbox exists. If no voicemail + context is specified, the default context + will be used. + This application will set the following channel variable upon completion: + + + This will contain the status of the execution of the MailboxExists application. + Possible values include: + + + + + + + + + Authenticate with Voicemail passwords. + + + + + + + + + + + + + + This application behaves the same way as the Authenticate application, but the passwords + are taken from voicemail.conf. If the mailbox is + specified, only that mailbox's password will be considered valid. If the mailbox + is not specified, the channel variable AUTH_MAILBOX will be set with the authenticated + mailbox. + + + + + Tell if a mailbox is configured. + + + + + + + Returns a boolean of whether the corresponding mailbox exists. + If context is not specified, defaults to the default + context. + + + ***/ + #ifdef IMAP_STORAGE static char imapserver[48]; static char imapport[8]; @@ -497,77 +678,6 @@ static char userscontext[AST_MAX_EXTENSION] = "default"; static char *addesc = "Comedian Mail"; -static char *synopsis_vm = "Leave a Voicemail message"; - -static char *descrip_vm = - " VoiceMail(mailbox[@context][&mailbox[@context]][...][,options]): This\n" - "application allows the calling party to leave a message for the specified\n" - "list of mailboxes. When multiple mailboxes are specified, the greeting will\n" - "be taken from the first mailbox specified. Dialplan execution will stop if the\n" - "specified mailbox does not exist.\n" - " The Voicemail application will exit if any of the following DTMF digits are\n" - "received:\n" - " 0 - Jump to the 'o' extension in the current dialplan context.\n" - " * - Jump to the 'a' extension in the current dialplan context.\n" - " This application will set the following channel variable upon completion:\n" - " VMSTATUS - This indicates the status of the execution of the VoiceMail\n" - " application. The possible values are:\n" - " SUCCESS | USEREXIT | FAILED\n\n" - " Options:\n" - " b - Play the 'busy' greeting to the calling party.\n" - " d([c]) - Accept digits for a new extension in context c, if played during\n" - " the greeting. Context defaults to the current context.\n" - " g(#) - Use the specified amount of gain when recording the voicemail\n" - " message. The units are whole-number decibels (dB).\n" - " Only works on supported technologies, which is DAHDI only.\n" - " s - Skip the playback of instructions for leaving a message to the\n" - " calling party.\n" - " u - Play the 'unavailable' greeting.\n" - " U - Mark message as Urgent.\n" - " P - Mark message as PRIORITY.\n"; - -static char *synopsis_vmain = "Check Voicemail messages"; - -static char *descrip_vmain = - " VoiceMailMain([mailbox][@context][,options]): This application allows the\n" - "calling party to check voicemail messages. A specific mailbox, and optional\n" - "corresponding context, may be specified. If a mailbox is not provided, the\n" - "calling party will be prompted to enter one. If a context is not specified,\n" - "the 'default' context will be used.\n\n" - " Options:\n" - " p - Consider the mailbox parameter as a prefix to the mailbox that\n" - " is entered by the caller.\n" - " g(#) - Use the specified amount of gain when recording a voicemail\n" - " message. The units are whole-number decibels (dB).\n" - " s - Skip checking the passcode for the mailbox.\n" - " a(#) - Skip folder prompt and go directly to folder specified.\n" - " Defaults to INBOX\n"; - -static char *synopsis_vm_box_exists = -"Check to see if Voicemail mailbox exists"; - -static char *descrip_vm_box_exists = - " MailboxExists(mailbox[@context][,options]): Check to see if the specified\n" - "mailbox exists. If no voicemail context is specified, the 'default' context\n" - "will be used.\n" - " This application will set the following channel variable upon completion:\n" - " VMBOXEXISTSSTATUS - This will contain the status of the execution of the\n" - " MailboxExists application. Possible values include:\n" - " SUCCESS | FAILED\n\n" - " Options: (none)\n"; - -static char *synopsis_vmauthenticate = "Authenticate with Voicemail passwords"; - -static char *descrip_vmauthenticate = - " VMAuthenticate([mailbox][@context][,options]): This application behaves the\n" - "same way as the Authenticate application, but the passwords are taken from\n" - "voicemail.conf.\n" - " If the mailbox is specified, only that mailbox's password will be considered\n" - "valid. If the mailbox is not specified, the channel variable AUTH_MAILBOX will\n" - "be set with the authenticated mailbox.\n\n" - " Options:\n" - " s - Skip playing the initial prompts.\n"; - /* Leave a message */ static char *app = "VoiceMail"; @@ -9532,11 +9642,6 @@ static int acf_mailbox_exists(struct ast_channel *chan, const char *cmd, char *a static struct ast_custom_function mailbox_exists_acf = { .name = "MAILBOX_EXISTS", - .synopsis = "Tell if a mailbox is configured", - .desc = -"Returns a boolean of whether the corresponding mailbox exists. If context\n" -"is not specified, defaults to the \"default\" context.\n", - .syntax = "MAILBOX_EXISTS([@])", .read = acf_mailbox_exists, }; @@ -10825,10 +10930,10 @@ static int load_module(void) if ((res = load_config(0))) return res; - res = ast_register_application(app, vm_exec, synopsis_vm, descrip_vm); - res |= ast_register_application(app2, vm_execmain, synopsis_vmain, descrip_vmain); - res |= ast_register_application(app3, vm_box_exists, synopsis_vm_box_exists, descrip_vm_box_exists); - res |= ast_register_application(app4, vmauthenticate, synopsis_vmauthenticate, descrip_vmauthenticate); + res = ast_register_application_xml(app, vm_exec); + res |= ast_register_application_xml(app2, vm_execmain); + res |= ast_register_application_xml(app3, vm_box_exists); + res |= ast_register_application_xml(app4, vmauthenticate); res |= ast_custom_function_register(&mailbox_exists_acf); res |= ast_manager_register("VoicemailUsersList", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, manager_list_voicemail_users, "List All Voicemail User Information"); if (res)