diff options
author | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-11 21:01:42 +0000 |
---|---|---|
committer | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-11 21:01:42 +0000 |
commit | ff63224c39f632b006738ee8bdc848873036300b (patch) | |
tree | 41ae9f3591db8ed94fa85ec2dd5332730fedaa6b /apps | |
parent | 8ba081fd020cbbb051d2658da8374333df473fc2 (diff) |
Build ecodes string a little better in app_voicemail so that the 'a' extension will work even if the 'o' extension doesn't exist. Also update the description to include info on the 'a' extension
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3189 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_voicemail.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index e2f3fbfc6..007b8775e 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -173,6 +173,8 @@ static char *descrip_vm = "* 'b' then the the busy message will be played (that is, busy instead of unavail).\n" "If the caller presses '0' (zero) during the prompt, the call jumps to\n" "priority 'o' in the current context.\n" +"If the caller presses '*' during the prompt, the call jumps to\n" +"priority 'a' in the current context.\n" "If the requested mailbox does not exist, and there exists a priority\n" "n + 101, then that priority will be taken next.\n" "Returns -1 on error or mailbox not found, or if the user hangs up.\n" @@ -1529,7 +1531,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent, int char ext_context[256] = ""; char fmt[80]; char *context; - char *ecodes = "#"; + char ecodes[16] = "#"; char *stringp; char tmp[256] = ""; struct ast_vm_user *vmu; @@ -1566,12 +1568,14 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent, int if (mkdir(dir, 0700) && (errno != EEXIST)) ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dir, strerror(errno)); if (ast_exists_extension(chan, strlen(chan->macrocontext) ? chan->macrocontext : chan->context, "o", 1, chan->callerid)) - ecodes = "#0*"; + strcat(ecodes, "0"); + if (ast_exists_extension(chan, strlen(chan->macrocontext) ? chan->macrocontext : chan->context, "a", 1, chan->callerid)) + strcat(ecodes, "*"); /* Play the beginning intro if desired */ if (strlen(prefile)) { if (ast_fileexists(prefile, NULL, NULL) > 0) { if (ast_streamfile(chan, prefile, chan->language) > -1) - res = ast_waitstream(chan, "#0*"); + res = ast_waitstream(chan, ecodes); } else { ast_log(LOG_DEBUG, "%s doesn't exist, doing what we can\n", prefile); res = invent_message(chan, vmu->context, ext, busy, ecodes); |