From: Anthony Minessale Date: Mon, 9 Jan 2012 20:57:29 +0000 (-0600) Subject: call set_user on sucessful auth-only: X-Git-Tag: v1.2-rc1~19^2~1^2~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=625731a0b84c26caf5345eaa2100b3a4812ac373;p=thirdparty%2Ffreeswitch.git call set_user on sucessful auth-only: --- 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; + } + }