From a296bb5707324057a752b359e3b25692a83e848a Mon Sep 17 00:00:00 2001 From: Anthony Minessale <anthony.minessale@gmail.com> Date: Thu, 2 Oct 2008 15:13:53 +0000 Subject: [PATCH] add voicemail_alternate_greet_id var git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9785 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_voicemail/mod_voicemail.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index 7ccc2cbf76..70f5f43e05 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -2666,8 +2666,12 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, cons TRY_CODE(switch_ivr_play_file(session, NULL, cbt.name_path, &args)); } if (*buf == '\0') { + const char *read_id; + if (!(read_id = switch_channel_get_variable(channel, "voicemail_alternate_greet_id"))) { + read_id = id; + } memset(buf, 0, sizeof(buf)); - TRY_CODE(switch_ivr_phrase_macro(session, VM_PLAY_GREETING_MACRO, id, NULL, &args)); + TRY_CODE(switch_ivr_phrase_macro(session, VM_PLAY_GREETING_MACRO, read_id, NULL, &args)); } }