Ejemplo n.º 1
0
        public static void ConfigureVoipProviders(TrunkManager trunkManager, SipServerConfigurationSection configuration)
        {
            foreach (var provider in configuration.VoipProviders)
            {
                trunkManager.Clear();

                trunkManager.Add(
                    new Trunk(
                        provider.DisplayName,
                        provider.ServerHostname,
                        provider.Username,
                        provider.Protocol.ToTransport(),
                        provider.LocalEndpoint,
                        provider.OutboundProxyHostname,
                        provider.AuthenticationId,
                        provider.Password,
                        provider.ForwardIncomingCallTo,
                        provider.RestoreAfterErrorTimeout));

                break;                 // one voip provider only!
            }
        }
Ejemplo n.º 2
0
        private void ConfigurationMonitor_Changed(object sender, EventArgs e)
        {
            var errors = SipServerConfigurationSection.LoadSection();

            if (errors.Count > 0)
            {
                // log errors!
            }
            else
            {
                var configuration = SipServerConfigurationSection.GetSection();

                Tracer.Configure(configuration.TracingPath, configuration.IsTracingEnabled);

                wcfService.AdministratorPassword = configuration.AdministratorPassword;
                restapi.AdministratorPassword    = configuration.AdministratorPassword;

                if (adUsers != null)
                {
                    adUsers.Group = configuration.ActiveDirectoryGroup;
                }

                authorization.IsEnabled = configuration.IsAuthorizationEnabled;

                trunkManager.Clear();
                Initializer.ConfigureVoipProviders(trunkManager, configuration);

                Initializer.ConfigureMras(mras, configuration);

                httpServer.WwwPath = configuration.WwwPath;

                transportLayer.ChangeSettings(configuration.WebSocketResponseFrame);

                proxyServerTU.IsOfficeSIPFiletransferEnabled = configuration.IsOfficeSIPFiletransferEnabled;
            }
        }
Ejemplo n.º 3
0
		public static void ConfigureVoipProviders(TrunkManager trunkManager, SipServerConfigurationSection configuration)
		{
			foreach (var provider in configuration.VoipProviders)
			{
				trunkManager.Clear();

				trunkManager.Add(
					new Trunk(
						provider.DisplayName,
						provider.ServerHostname,
						provider.Username,
						provider.Protocol.ToTransport(),
						provider.LocalEndpoint,
						provider.OutboundProxyHostname,
						provider.AuthenticationId,
						provider.Password,
						provider.ForwardIncomingCallTo,
						provider.RestoreAfterErrorTimeout));

				break; // one voip provider only!
			}
		}