aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorMelanie2010-11-21 20:59:01 +0000
committerMelanie2010-11-21 21:29:11 +0000
commitc0ccfeebe78dc1d0136f86e5f0e9562c4804cfa9 (patch)
tree84d5075069f51f3d7f0af9f46e9274a8b1531c44 /OpenSim/Services
parentFix global region coordinates that are delivered by llRequestSimulatorData. (diff)
downloadopensim-SC_OLD-c0ccfeebe78dc1d0136f86e5f0e9562c4804cfa9.zip
opensim-SC_OLD-c0ccfeebe78dc1d0136f86e5f0e9562c4804cfa9.tar.gz
opensim-SC_OLD-c0ccfeebe78dc1d0136f86e5f0e9562c4804cfa9.tar.bz2
opensim-SC_OLD-c0ccfeebe78dc1d0136f86e5f0e9562c4804cfa9.tar.xz
Start implementing Freeswitch in ROBUST
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/FreeswitchService/FreeswitchService.cs12
-rw-r--r--OpenSim/Services/FreeswitchService/FreeswitchServiceBase.cs36
-rw-r--r--OpenSim/Services/Interfaces/IFreeswitchService.cs4
3 files changed, 48 insertions, 4 deletions
diff --git a/OpenSim/Services/FreeswitchService/FreeswitchService.cs b/OpenSim/Services/FreeswitchService/FreeswitchService.cs
index 0a38300..109ef9b 100644
--- a/OpenSim/Services/FreeswitchService/FreeswitchService.cs
+++ b/OpenSim/Services/FreeswitchService/FreeswitchService.cs
@@ -33,19 +33,27 @@ using OpenSim.Framework;
33using OpenSim.Data; 33using OpenSim.Data;
34using OpenSim.Services.Interfaces; 34using OpenSim.Services.Interfaces;
35using OpenMetaverse; 35using OpenMetaverse;
36using System.Collections;
36 37
37namespace OpenSim.Services.FreeswitchService 38namespace OpenSim.Services.FreeswitchService
38{ 39{
39 public class FreeswitchService : FreeswitchServiceBase, IFreeswitchService 40 public class FreeswitchService : FreeswitchServiceBase, IFreeswitchService
40 { 41 {
41 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42 43
43 public FreeswitchService(IConfigSource config) : base(config) 44 public FreeswitchService(IConfigSource config) : base(config)
44 { 45 {
45 // Perform initilialization here 46 // Perform initilialization here
46 } 47 }
47 48
49 public Hashtable HandleDirectoryRequest(Hashtable requestBody)
50 {
51 return new Hashtable();
52 }
48 53
49 // Implement IFreeswitchService here 54 public Hashtable HandleDialplanRequest(Hashtable requestBody)
55 {
56 return new Hashtable();
57 }
50 } 58 }
51} 59}
diff --git a/OpenSim/Services/FreeswitchService/FreeswitchServiceBase.cs b/OpenSim/Services/FreeswitchService/FreeswitchServiceBase.cs
index 83fecef..ebbb1b0 100644
--- a/OpenSim/Services/FreeswitchService/FreeswitchServiceBase.cs
+++ b/OpenSim/Services/FreeswitchService/FreeswitchServiceBase.cs
@@ -31,11 +31,28 @@ using Nini.Config;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Services.Interfaces; 32using OpenSim.Services.Interfaces;
33using OpenSim.Services.Base; 33using OpenSim.Services.Base;
34using log4net;
34 35
35namespace OpenSim.Services.FreeswitchService 36namespace OpenSim.Services.FreeswitchService
36{ 37{
37 public class FreeswitchServiceBase : ServiceBase 38 public class FreeswitchServiceBase : ServiceBase
38 { 39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41
42 protected string m_freeSwitchRealm;
43 protected string m_freeSwitchSIPProxy;
44 protected bool m_freeSwitchAttemptUseSTUN = false;
45 protected string m_freeSwitchEchoServer;
46 protected int m_freeSwitchEchoPort = 50505;
47 protected string m_freeSwitchDefaultWellKnownIP;
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";
53
54 protected bool m_Enabled = false;
55
39 public FreeswitchServiceBase(IConfigSource config) : base(config) 56 public FreeswitchServiceBase(IConfigSource config) : base(config)
40 { 57 {
41 // 58 //
@@ -44,7 +61,24 @@ namespace OpenSim.Services.FreeswitchService
44 IConfig freeswitchConfig = config.Configs["FreeswitchService"]; 61 IConfig freeswitchConfig = config.Configs["FreeswitchService"];
45 if (freeswitchConfig != null) 62 if (freeswitchConfig != null)
46 { 63 {
47 // Read config here !! 64 m_freeSwitchDefaultWellKnownIP = freeswitchConfig.GetString("ServerAddress", String.Empty);
65 if (m_freeSwitchDefaultWellKnownIP == String.Empty)
66 {
67 m_log.Error("[FREESWITCH]: No FreeswitchServerAddress given, can't continue");
68 return;
69 }
70
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); // This may not work
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);
80
81 m_Enabled = true;
48 } 82 }
49 } 83 }
50 } 84 }
diff --git a/OpenSim/Services/Interfaces/IFreeswitchService.cs b/OpenSim/Services/Interfaces/IFreeswitchService.cs
index d1f635b..2b3ffeb 100644
--- a/OpenSim/Services/Interfaces/IFreeswitchService.cs
+++ b/OpenSim/Services/Interfaces/IFreeswitchService.cs
@@ -27,11 +27,13 @@
27 27
28using System; 28using System;
29using OpenSim.Framework; 29using OpenSim.Framework;
30using System.Collections;
30 31
31namespace OpenSim.Services.Interfaces 32namespace OpenSim.Services.Interfaces
32{ 33{
33 public interface IFreeswitchService 34 public interface IFreeswitchService
34 { 35 {
35 // Place anything the connector eeds to access here! 36 Hashtable HandleDirectoryRequest(Hashtable requestBody);
37 Hashtable HandleDialplanRequest(Hashtable requestBody);
36 } 38 }
37} 39}