Skip to content
Snippets Groups Projects
Commit aa7fcf73 authored by Mark Spencer's avatar Mark Spencer
Browse files

Version 0.1.9 from FTP

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 5cab6248
No related branches found
No related tags found
No related merge requests found
......@@ -30,11 +30,12 @@ static char *app = "Directory";
static char *synopsis = "Provide directory of voicemail extensions";
static char *descrip =
" Directory(context): Presents the user with a directory of extensions from which\n"
" they may select by name. The list of names and extensions is discovered from\n"
" voicemail.conf. The context argument is required, and specifies the context\n"
" in which to interpret the extensions\n. Returns 0 unless the user hangs up. It\n"
" also sets up the channel on exit to enter the extension the user selected.\n";
" Directory(context): Presents the user with a directory of extensions from\n"
"which they may select by name. The list of names and extensions is\n"
"discovered from voicemail.conf. The context argument is required, and\n"
"specifies the context in which to interpret the extensions\n. Returns 0\n"
"unless the user hangs up. It also sets up the channel on exit to enter the\n"
"extension the user selected.\n";
/* For simplicity, I'm keeping the format compatible with the voicemail config,
but i'm open to suggestions for isolating it */
......@@ -129,7 +130,8 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
char fn[256];
memset(ext, 0, sizeof(ext));
ext[0] = digit;
res = ast_readstring(chan, ext + 1, NUMDIGITS, 3000, 3000, "#");
res = 0;
if (ast_readstring(chan, ext + 1, NUMDIGITS, 3000, 3000, "#") < 0) res = -1;
if (!res) {
/* Search for all names which start with those digits */
v = ast_variable_browse(cfg, context);
......
This diff is collapsed.
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Application convenience functions, designed to give consistent
* look and feel to asterisk apps.
*
* Copyright (C) 1999, Mark Spencer
*
* Mark Spencer <markster@linux-support.net>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#ifndef _ASTERISK_APP_H
#define _ASTERISK_APP_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment