summaryrefslogtreecommitdiff
path: root/apps/app_directory.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_directory.c')
-rw-r--r--apps/app_directory.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 3afb19f29..350401e46 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -26,7 +26,6 @@
*/
/*** MODULEINFO
- <depend>app_voicemail</depend>
<support_level>core</support_level>
***/
#include "asterisk.h"
@@ -290,7 +289,13 @@ static int play_mailbox_owner(struct ast_channel *chan, const char *context,
const char *ext, const char *name, struct ast_flags *flags)
{
int res = 0;
- if ((res = ast_app_sayname(chan, ext, context)) >= 0) {
+ char *mailbox_id;
+
+ mailbox_id = ast_alloca(strlen(ext) + strlen(context) + 2);
+ sprintf(mailbox_id, "%s@%s", ext, context); /* Safe */
+
+ res = ast_app_sayname(chan, mailbox_id);
+ if (res >= 0) {
ast_stopstream(chan);
/* If Option 'e' was specified, also read the extension number with the name */
if (ast_test_flag(flags, OPT_SAYEXTENSION)) {