Ejemplo n.º 1
0
        public static void EnableTargetUserForUM(IRecipientSession tenantLocalRecipientSession, IConfigurationSession tenantLocalConfigSession, bool isDatacenter, ADUser sourceUser, ADUser targetUser)
        {
            UMMailboxPolicy policy;
            UMDialPlan      dialPlan;
            MultiValuedProperty <string> extensions;
            string sipResourceIdentifier;

            MigrationHelper.GetUMSettingsFromSourceUser(tenantLocalRecipientSession, tenantLocalConfigSession, isDatacenter, sourceUser, targetUser, out policy, out dialPlan, out extensions, out sipResourceIdentifier);
            targetUser.UMEnabledFlags |= UMEnabledFlags.UMEnabled;
            Utils.UMPopulate(targetUser, sipResourceIdentifier, extensions, policy, dialPlan);
        }
Ejemplo n.º 2
0
        public static void ValidateTargetUserCanBeEnabledForUM(IRecipientSession tenantLocalRecipientSession, IConfigurationSession tenantLocalConfigSession, bool isDatacenter, ADUser sourceUser, ADUser targetUser)
        {
            if (!sourceUser.UMEnabled)
            {
                return;
            }
            UMMailboxPolicy ummailboxPolicy;
            UMDialPlan      umdialPlan;
            MultiValuedProperty <string> multiValuedProperty;
            string text;

            MigrationHelper.GetUMSettingsFromSourceUser(tenantLocalRecipientSession, tenantLocalConfigSession, isDatacenter, sourceUser, targetUser, out ummailboxPolicy, out umdialPlan, out multiValuedProperty, out text);
        }
Ejemplo n.º 3
0
        private static void GetUMSettingsFromSourceUser(IRecipientSession tenantLocalRecipientSession, IConfigurationSession tenantLocalConfigSession, bool isDatacenter, ADUser sourceUser, ADUser targetUser, out UMMailboxPolicy targetPolicy, out UMDialPlan targetDialPlan, out MultiValuedProperty <string> targetUserExtensions, out string targetUserSipResourceIdentifier)
        {
            if (!Utils.UnifiedMessagingAvailable(targetUser))
            {
                throw new UMNotAvailableForUserInTargetForestException();
            }
            targetPolicy         = MigrationHelper.GetTargetPolicy(tenantLocalConfigSession, sourceUser);
            targetDialPlan       = tenantLocalConfigSession.Read <UMDialPlan>(targetPolicy.UMDialPlan);
            targetUserExtensions = MigrationHelper.GetTargetUserExtensions(sourceUser, targetDialPlan, out targetUserSipResourceIdentifier);
            LocalizedException           ex;
            TelephoneNumberProcessStatus telephoneNumberProcessStatus;

            Utils.ValidateExtensionsAndSipResourceIdentifier(tenantLocalRecipientSession, tenantLocalConfigSession, isDatacenter, targetUser, targetDialPlan, targetUserExtensions.ToArray(), null, targetUserSipResourceIdentifier, out ex, out telephoneNumberProcessStatus);
            if (ex != null)
            {
                throw ex;
            }
        }