diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-09-03 03:26:29 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-09-03 03:26:29 +0000 |
commit | 0638ba5bbe1379c8fc8875d7e233299da4084742 (patch) | |
tree | ec4091503877a133146aceff32fad4666c30dc0c | |
parent | a0c4cf53bd148f54d8d97719b4aee56b1dd3afe9 (diff) |
Use exitcontext when available (bug #2363)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3715 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | apps/app_voicemail.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index dd227f13e..27e16b6ec 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1769,14 +1769,20 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent, int ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dir, strerror(errno)); /* Check current or macro-calling context for special extensions */ - if (ast_exists_extension(chan, chan->context, "o", 1, chan->callerid)) + if (!ast_strlen_zero(vmu->exit)) { + if (ast_exists_extension(chan, vmu->exit, "o", 1, chan->callerid)) + strncat(ecodes, "0", sizeof(ecodes) - strlen(ecodes) - 1); + } else if (ast_exists_extension(chan, chan->context, "o", 1, chan->callerid)) strncat(ecodes, "0", sizeof(ecodes) - strlen(ecodes) - 1); else if (!ast_strlen_zero(chan->macrocontext) && ast_exists_extension(chan, chan->macrocontext, "o", 1, chan->callerid)) { strncat(ecodes, "0", sizeof(ecodes) - strlen(ecodes) - 1); ousemacro = 1; } - if (ast_exists_extension(chan, chan->context, "a", 1, chan->callerid)) + if (!ast_strlen_zero(vmu->exit)) { + if (ast_exists_extension(chan, vmu->exit, "a", 1, chan->callerid)) + strncat(ecodes, "*", sizeof(ecodes) - strlen(ecodes) - 1); + } else if (ast_exists_extension(chan, chan->context, "a", 1, chan->callerid)) strncat(ecodes, "*", sizeof(ecodes) - strlen(ecodes) - 1); else if (!ast_strlen_zero(chan->macrocontext) && ast_exists_extension(chan, chan->macrocontext, "a", 1, chan->callerid)) { strncat(ecodes, "*", sizeof(ecodes) - strlen(ecodes) - 1); |