Version 0.1.1 from FTP

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
1999-12-18 07:01:48 +00:00
parent 86361b6866
commit 28bb339275
4 changed files with 123 additions and 38 deletions

View File

@@ -3,7 +3,7 @@
*
* Voicemail System (did you ever think it could be so easy?)
*
* Copyright (C) 1999, Adtran Inc. and Linux Support Services, LLC
* Copyright (C) 1999, Mark Spencer
*
* Mark Spencer <markster@linux-support.net>
*
@@ -153,7 +153,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent)
ast_log(LOG_WARNING, "No such configuration file %s\n", VOICEMAIL_CONFIG);
return -1;
}
if ((copy = ast_variable_retrieve(cfg, chan->context, ext))) {
if ((copy = ast_variable_retrieve(cfg, NULL, ext))) {
/* Make sure they have an entry in the config */
copy = strdup(copy);
passwd = strtok(copy, ",");
@@ -320,11 +320,15 @@ static int vm_execmain(struct ast_channel *chan, void *data)
/* Prompt for, and read in the username */
if (ast_readstring(chan, username, sizeof(username), 2000, 5000, "#"))
goto out;
if (!strlen(username)) {
res = 0;
goto out;
}
if (ast_streamfile(chan, "vm-password"))
goto out;
if (ast_readstring(chan, password, sizeof(password), 2000, 5000, "#"))
goto out;
copy = ast_variable_retrieve(cfg, chan->context, username);
copy = ast_variable_retrieve(cfg, NULL, username);
if (copy) {
copy = strdup(copy);
strtok(copy, ",");