diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-04-09 23:56:15 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-04-09 23:56:15 +0000 |
commit | 40028fe80ea1c36b7eb35e5cda282d5d083336ab (patch) | |
tree | 9b9863de3fe260fd81cfcd4e88ab97137001f3c7 /apps/app_voicemail.c | |
parent | b5dfede5e4a0a446a83413e3a42ea77e60f08c7f (diff) |
Add new "macrocontext" field (yes, you need to "make clean ; make install"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@808 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rwxr-xr-x | apps/app_voicemail.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index d14884931..7f32db009 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -492,7 +492,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent, int make_dir(dir, sizeof(dir), ext, "INBOX"); if (mkdir(dir, 0700) && (errno != EEXIST)) ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dir, strerror(errno)); - if (ast_exists_extension(chan, chan->context, "o", 1, chan->callerid)) + if (ast_exists_extension(chan, strlen(chan->macrocontext) ? chan->macrocontext : chan->context, "o", 1, chan->callerid)) ecodes = "#0"; /* Play the beginning intro if desired */ if (strlen(prefile)) { @@ -520,6 +520,8 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent, int } } else if (silent == '0') { strncpy(chan->exten, "o", sizeof(chan->exten) - 1); + if (strlen(chan->macrocontext)) + strncpy(chan->context, chan->macrocontext, sizeof(chan->context) - 1); chan->priority = 0; ast_softhangup(chan, AST_SOFTHANGUP_ASYNCGOTO); free(copy); |