fix set user call to include domain

This commit is contained in:
Brian West 2012-07-15 00:05:28 -05:00
parent f55f15c888
commit b2f0e90795
1 changed files with 4 additions and 1 deletions

View File

@ -2548,7 +2548,10 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
if (authed) {
switch_channel_set_variable(channel, "user_pin_authenticated", "true");
switch_channel_set_variable(channel, "user_pin_authenticated_user", myid);
if (!zstr(myid)) switch_ivr_set_user(session, myid);
if (!zstr(myid) && !zstr(domain_name)) {
char *account = switch_core_session_sprintf(session, "%s@%s", myid, domain_name);
switch_ivr_set_user(session, account);
}
} else {
switch_channel_hangup(channel, SWITCH_CAUSE_USER_CHALLENGE);
}