From 2b0ef9ad1d46d89e01bc9149c8689aaa0b412587 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 21 Nov 2010 22:17:25 +0000 Subject: Implement a method to allow regions to query the gridwide Freeswitch configuration from ROBUST --- .../Services/FreeswitchService/FreeswitchService.cs | 20 ++++++++++++++++++++ OpenSim/Services/Interfaces/IFreeswitchService.cs | 1 + 2 files changed, 21 insertions(+) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/FreeswitchService/FreeswitchService.cs b/OpenSim/Services/FreeswitchService/FreeswitchService.cs index b62a65a..21518f3 100644 --- a/OpenSim/Services/FreeswitchService/FreeswitchService.cs +++ b/OpenSim/Services/FreeswitchService/FreeswitchService.cs @@ -34,6 +34,7 @@ using OpenSim.Framework; using OpenSim.Data; using OpenSim.Services.Interfaces; using OpenMetaverse; +using OpenMetaverse.StructuredData; using System.Collections; namespace OpenSim.Services.FreeswitchService @@ -384,5 +385,24 @@ namespace OpenSim.Services.FreeswitchService return response; } + + public string GetJsonConfig() + { + OSDMap map = new OSDMap(11); + + map.Add("Realm", m_freeSwitchRealm); + map.Add("SIPProxy", m_freeSwitchSIPProxy); + map.Add("AttemptUseSTUN", m_freeSwitchAttemptUseSTUN); + map.Add("EchoServer", m_freeSwitchEchoServer); + map.Add("EchoPort", m_freeSwitchEchoPort); + map.Add("DefaultWellKnownIP", m_freeSwitchDefaultWellKnownIP); + map.Add("DefaultTimeout", m_freeSwitchDefaultTimeout); + map.Add("Context", m_freeSwitchContext); + map.Add("ServerUser", m_freeSwitchServerUser); + map.Add("ServerPass", m_freeSwitchServerPass); + map.Add("APIPrefix", m_freeSwitchAPIPrefix); + + return OSDParser.SerializeJsonString(map); + } } } diff --git a/OpenSim/Services/Interfaces/IFreeswitchService.cs b/OpenSim/Services/Interfaces/IFreeswitchService.cs index 2b3ffeb..e7941d5 100644 --- a/OpenSim/Services/Interfaces/IFreeswitchService.cs +++ b/OpenSim/Services/Interfaces/IFreeswitchService.cs @@ -35,5 +35,6 @@ namespace OpenSim.Services.Interfaces { Hashtable HandleDirectoryRequest(Hashtable requestBody); Hashtable HandleDialplanRequest(Hashtable requestBody); + string GetJsonConfig(); } } -- cgit v1.1