bool AddBlockingPhoneNumbers(CXCallDirectoryExtensionContext context)
        {
            // Retrieve phone numbers to block from data store. For optimal performance and memory usage when there are many phone numbers,
            // consider only loading a subset of numbers at a given time and using autorelease pool(s) to release objects allocated during each batch of numbers which are loaded.
            //
            // Numbers must be provided in numerically ascending order.

            context.RemoveAllBlockingEntries();

            ProfileManager mgr = new ProfileManager();

            Profile[] allProfiles = mgr.GetAllProfiles();

            List <long> allNumbers = new List <long>();

            foreach (Profile prof in allProfiles)
            {
                if (!prof.Allowed)
                {
                    foreach (long phoneNumber in prof.PhoneNumbersAsLongs)
                    {
                        allNumbers.Add(phoneNumber);
                    }
                }
            }
            allNumbers.Sort();
            foreach (long phoneNumber in allNumbers)
            {
                context.AddBlockingEntry(phoneNumber);
            }

            return(true);
        }
        bool AddBlockingPhoneNumbers(CXCallDirectoryExtensionContext context)
        {
            // Retrieve phone numbers to block from data store. For optimal performance and memory usage when there are many phone numbers,
            // consider only loading a subset of numbers at a given time and using autorelease pool(s) to release objects allocated during each batch of numbers which are loaded.
            //
            // Numbers must be provided in numerically ascending order.

            long[] phoneNumbers = { 14085555555, 18005555555 };

            foreach (var phoneNumber in phoneNumbers)
            {
                context.AddBlockingEntry(phoneNumber);
            }

            return(true);
        }