From 625731a0b84c26caf5345eaa2100b3a4812ac373 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 9 Jan 2012 14:57:29 -0600 Subject: [PATCH] call set_user on sucessful auth-only: --- src/mod/applications/mod_voicemail/mod_voicemail.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index d5397e5465..f3c6da8ab4 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -2517,19 +2517,20 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p status = switch_ivr_phrase_macro(session, VM_GOODBYE_MACRO, NULL, NULL, NULL); } - if (x_user) { - switch_xml_free(x_user); - x_user = NULL; - } - if (auth_only) { if (authed) { switch_channel_set_variable(channel, "user_pin_authenticated", "true"); + if (!zstr(myid)) switch_ivr_set_user(session, myid); } else { switch_channel_hangup(channel, SWITCH_CAUSE_USER_CHALLENGE); } } + if (x_user) { + switch_xml_free(x_user); + x_user = NULL; + } + }