Пример #1
0
        void IWcfService.SetTurnConfigurations(WcfTurnConfiguration wcf)
        {
            var configuration = SipServerConfigurationSection.GetSection();

            configuration.TurnServers.Key1 = wcf.Key1;
            configuration.TurnServers.Key2 = wcf.Key2;

            configuration.TurnServers.Clear();
            configuration.TurnServers.Add(wcf.FQDN, wcf.TCPPort, wcf.UDPPort, true);
            configuration.TurnServers.Add(wcf.FQDN, wcf.TCPPort, wcf.UDPPort, false);

            ////m_MRAS.SetTURN( configurations.FQDN, configurations.TCPPort, configurations.UDPPort, configurations.Key1, configurations.Key2 );

            configuration.Save();
        }
Пример #2
0
        WcfTurnConfiguration IWcfService.GetTurnConfigurations()
        {
            var configuration = SipServerConfigurationSection.GetSection();

            var result = new WcfTurnConfiguration()
            {
                Key1 = configuration.TurnServers.Key1,
                Key2 = configuration.TurnServers.Key2,
            };

            if (configuration.TurnServers.Count > 0)
            {
                foreach (TurnServerConfigurationElement item in configuration.TurnServers)
                {
                    result.FQDN    = item.Fqdn;
                    result.TCPPort = item.TcpPort;
                    result.UDPPort = item.UdpPort;
                    break;
                }
            }

            return(result);
        }
Пример #3
0
        void IWcfService.SetTurnConfigurations(WcfTurnConfiguration wcf)
        {
            var configuration = SipServerConfigurationSection.GetSection();

            configuration.TurnServers.Key1 = wcf.Key1;
            configuration.TurnServers.Key2 = wcf.Key2;

            configuration.TurnServers.Clear();
            configuration.TurnServers.Add(wcf.FQDN, wcf.TCPPort, wcf.UDPPort, true);
            configuration.TurnServers.Add(wcf.FQDN, wcf.TCPPort, wcf.UDPPort, false);

            ////m_MRAS.SetTURN( configurations.FQDN, configurations.TCPPort, configurations.UDPPort, configurations.Key1, configurations.Key2 );

            configuration.Save();
        }
Пример #4
0
        WcfTurnConfiguration IWcfService.GetTurnConfigurations()
        {
            var configuration = SipServerConfigurationSection.GetSection();

            var result = new WcfTurnConfiguration()
            {
                Key1 = configuration.TurnServers.Key1,
                Key2 = configuration.TurnServers.Key2,
            };

            if (configuration.TurnServers.Count > 0)
            {
                foreach (TurnServerConfigurationElement item in configuration.TurnServers)
                {
                    result.FQDN = item.Fqdn;
                    result.TCPPort = item.TcpPort;
                    result.UDPPort = item.UdpPort;
                    break;
                }
            }

            return result;
        }