Ejemplo n.º 1
0
        protected virtual void ProcessUserPropertiesInstance(IUccProvisioningPolicyInstance userProperties)
        {
            IUccProperty property = userProperties.Properties.get_NamedProperty(@"lines");

            if (property != null)
            {
                IUccCollection phoneLines = property.Value as IUccCollection;

                if (phoneLines.Count > 0)
                {
                    PhoneLine[] phones = new PhoneLine[phoneLines.Count];

                    for (int i = 0; i < phones.Length; i++)
                    {
                        IUccPresencePhoneLine line = phoneLines[i + 1] as IUccPresencePhoneLine;

                        phones[i] = new PhoneLine();

                        try { phones[i].LineServer = line.LineServer; }
                        catch (COMException) { }

                        try { phones[i].Uri = line.Uri; }
                        catch (COMException) { }

                        try { phones[i].UccLineType = line.LineType; }
                        catch (COMException) { }
                    }

                    this.Phones = phones;
                }
            }

            this.Fax      = GetNamedProperty(userProperties, @"facsimileTelephoneNumber");
            this.Homepage = GetNamedProperty(userProperties, @"wWWHomePage");

            string streetAddr  = GetNamedProperty(userProperties, @"streetAddress");
            string city        = GetNamedProperty(userProperties, @"l");
            string state       = GetNamedProperty(userProperties, @"st");
            string zip         = GetNamedProperty(userProperties, @"postalCode");
            string countryCode = GetNamedProperty(userProperties, @"countryCode");

            string addr = @"";

            if (string.IsNullOrEmpty(streetAddr) == false)
            {
                addr += streetAddr + "\r\n";
            }
            if (string.IsNullOrEmpty(state) == false)
            {
                addr += state + "\r\n";
            }
            if (string.IsNullOrEmpty(city) == false)
            {
                addr += city + "\r\n";
            }
            addr += zip + @" " + countryCode;

            this.Address = addr;
        }
Ejemplo n.º 2
0
        void _IUccMediaEndpointEvents.OnFindMediaConnectivityServers(IUccMediaEndpointSettings eventSource, IUccFindMediaConnectivityServersEvent eventData)
        {
            if (Helpers.IsOperationCompleteOk(eventData))
            {
                IUccCollection mediaServerConfigs = eventData.MediaConnectivityServerConfigurations;

                foreach (IUccMediaConnectivityServerConfiguration serverConfig in mediaServerConfigs)
                {
                    this.mediaEndpointSettings.AddMediaConnectivityServerWithCredential(serverConfig);
                }
            }
        }
Ejemplo n.º 3
0
        internal void setMicroLevel(int p)
        {
            IUccMediaDeviceManager mediaDevMan = platform as IUccMediaDeviceManager;

            IUccCollection col = mediaDevMan.GetDevices(UCC_MEDIA_TYPES.UCCMT_AUDIO, UCC_MEDIA_DIRECTIONS.UCCMD_SEND);

            foreach (IUccMediaDevice dev in col)
            {
                IUccMediaDevice selected = mediaDevMan.GetRecommendedDevice(UCC_AUDIO_VIDEO_DEVICE_CATEGORY.UCCAVDC_AUDIO_VIDEO_CALL_DEVICE, UCC_MEDIA_TYPES.UCCMT_AUDIO, UCC_MEDIA_DIRECTIONS.UCCMD_SEND);
                mediaDevMan.SetSelectedDevice(UCC_AUDIO_VIDEO_DEVICE_CATEGORY.UCCAVDC_AUDIO_VIDEO_CALL_DEVICE, UCC_MEDIA_TYPES.UCCMT_AUDIO, UCC_MEDIA_DIRECTIONS.UCCMD_SEND, dev);
                //mediaDevMan.SetSelectedDevice(UCC_AUDIO_VIDEO_DEVICE_CATEGORY.UCCAVDC_AUDIO_VIDEO_CALL_NONPRIVATE_DEVICE, UCC_MEDIA_TYPES.UCCMT_AUDIO, UCC_MEDIA_DIRECTIONS.UCCMD_SEND, dev);

                IUccAudioMediaDevice devAudio = dev as IUccAudioMediaDevice;
                devAudio.Volume  = p;
                devAudio.IsMuted = false;
            }
        }
Ejemplo n.º 4
0
        private void SetupAudioMicro()
        {
            IUccMediaDeviceManager mediaDevMan = platform as IUccMediaDeviceManager;

            IUccCollection col = mediaDevMan.GetDevices(UCC_MEDIA_TYPES.UCCMT_AUDIO, UCC_MEDIA_DIRECTIONS.UCCMD_RECEIVE);

            foreach (IUccMediaDevice dev in col)
            {
                IUccMediaDevice selected = mediaDevMan.GetRecommendedDevice(UCC_AUDIO_VIDEO_DEVICE_CATEGORY.UCCAVDC_AUDIO_VIDEO_CALL_DEVICE, UCC_MEDIA_TYPES.UCCMT_AUDIO, UCC_MEDIA_DIRECTIONS.UCCMD_RECEIVE);
                mediaDevMan.SetSelectedDevice(UCC_AUDIO_VIDEO_DEVICE_CATEGORY.UCCAVDC_AUDIO_VIDEO_CALL_DEVICE, UCC_MEDIA_TYPES.UCCMT_AUDIO, UCC_MEDIA_DIRECTIONS.UCCMD_RECEIVE, dev);
                //mediaDevMan.SetSelectedDevice(UCC_AUDIO_VIDEO_DEVICE_CATEGORY.UCCAVDC_AUDIO_VIDEO_CALL_NONPRIVATE_DEVICE, UCC_MEDIA_TYPES.UCCMT_AUDIO, UCC_MEDIA_DIRECTIONS.UCCMD_SEND, dev);

                IUccAudioMediaDevice devAudio = dev as IUccAudioMediaDevice;
                devAudio.Volume  = UccConstants.UCCMSC_MAX_AUDIO_VOLUME;
                devAudio.IsMuted = false;
            }
        }