29 using System.Reflection;
31 using OpenSim.Framework;
32 using OpenSim.Services.Interfaces;
33 using OpenSim.Services.Base;
36 namespace OpenSim.Services.FreeswitchService
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 protected bool m_freeSwitchAttemptUseSTUN =
false;
46 protected int m_freeSwitchEchoPort = 50505;
48 protected int m_freeSwitchDefaultTimeout = 5000;
49 protected string m_freeSwitchContext =
"default";
50 protected string m_freeSwitchServerUser =
"freeswitch";
51 protected string m_freeSwitchServerPass =
"password";
52 protected readonly
string m_freeSwitchAPIPrefix =
"/fsapi";
54 protected bool m_Enabled =
false;
61 IConfig freeswitchConfig = config.Configs[
"FreeswitchService"];
62 if (freeswitchConfig != null)
64 m_freeSwitchDefaultWellKnownIP = freeswitchConfig.GetString(
"ServerAddress", String.Empty);
65 if (m_freeSwitchDefaultWellKnownIP == String.Empty)
67 m_log.Error(
"[FREESWITCH]: No ServerAddress given, cannot start service.");
71 m_freeSwitchRealm = freeswitchConfig.GetString(
"Realm", m_freeSwitchDefaultWellKnownIP);
72 m_freeSwitchSIPProxy = freeswitchConfig.GetString(
"SIPProxy", m_freeSwitchDefaultWellKnownIP +
":5060");
73 m_freeSwitchEchoServer = freeswitchConfig.GetString(
"EchoServer", m_freeSwitchDefaultWellKnownIP);
74 m_freeSwitchEchoPort = freeswitchConfig.GetInt(
"EchoPort", m_freeSwitchEchoPort);
75 m_freeSwitchAttemptUseSTUN = freeswitchConfig.GetBoolean(
"AttemptSTUN",
false);
76 m_freeSwitchDefaultTimeout = freeswitchConfig.GetInt(
"DefaultTimeout", m_freeSwitchDefaultTimeout);
77 m_freeSwitchContext = freeswitchConfig.GetString(
"Context", m_freeSwitchContext);
78 m_freeSwitchServerUser = freeswitchConfig.GetString(
"UserName", m_freeSwitchServerUser);
79 m_freeSwitchServerPass = freeswitchConfig.GetString(
"Password", m_freeSwitchServerPass);
string m_freeSwitchEchoServer
string m_freeSwitchDefaultWellKnownIP
FreeswitchServiceBase(IConfigSource config)
string m_freeSwitchSIPProxy