]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
call set_user on sucessful auth-only:
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 9 Jan 2012 20:57:29 +0000 (14:57 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 9 Jan 2012 20:57:29 +0000 (14:57 -0600)
src/mod/applications/mod_voicemail/mod_voicemail.c

index d5397e5465d46ad64dd7c30f1d7bf2350d330132..f3c6da8ab41de482f544271bc81e2005f03e7407 100644 (file)
@@ -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;
+       }
+
 }