diff options
author | Melanie | 2010-11-21 23:47:28 +0000 |
---|---|---|
committer | Melanie | 2010-11-21 23:47:28 +0000 |
commit | 8d7b181b58d89b109b522d1b1401ea72cf16e694 (patch) | |
tree | 69d7ae271383933e82be070d652dc7979f54a09b /OpenSim/Server | |
parent | Add the remote connector for freeswitch config retrieval (diff) | |
parent | Add the remote connector for freeswitch config retrieval (diff) | |
download | opensim-SC_OLD-8d7b181b58d89b109b522d1b1401ea72cf16e694.zip opensim-SC_OLD-8d7b181b58d89b109b522d1b1401ea72cf16e694.tar.gz opensim-SC_OLD-8d7b181b58d89b109b522d1b1401ea72cf16e694.tar.bz2 opensim-SC_OLD-8d7b181b58d89b109b522d1b1401ea72cf16e694.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Server')
-rw-r--r-- | OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs b/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs index 150df45..da56b87 100644 --- a/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs +++ b/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs | |||
@@ -35,6 +35,8 @@ using OpenSim.Services.Interfaces; | |||
35 | using OpenSim.Framework.Servers.HttpServer; | 35 | using OpenSim.Framework.Servers.HttpServer; |
36 | using OpenSim.Server.Handlers.Base; | 36 | using OpenSim.Server.Handlers.Base; |
37 | using log4net; | 37 | using log4net; |
38 | using OpenMetaverse; | ||
39 | using OpenMetaverse.StructuredData; | ||
38 | 40 | ||
39 | namespace OpenSim.Server.Handlers.Freeswitch | 41 | namespace OpenSim.Server.Handlers.Freeswitch |
40 | { | 42 | { |
@@ -67,12 +69,16 @@ namespace OpenSim.Server.Handlers.Freeswitch | |||
67 | ServerUtils.LoadPlugin<IFreeswitchService>(freeswitchService, args); | 69 | ServerUtils.LoadPlugin<IFreeswitchService>(freeswitchService, args); |
68 | 70 | ||
69 | server.AddHTTPHandler(String.Format("{0}/freeswitch-config", m_freeSwitchAPIPrefix), FreeSwitchConfigHTTPHandler); | 71 | server.AddHTTPHandler(String.Format("{0}/freeswitch-config", m_freeSwitchAPIPrefix), FreeSwitchConfigHTTPHandler); |
72 | server.AddHTTPHandler(String.Format("{0}/region-config", m_freeSwitchAPIPrefix), RegionConfigHTTPHandler); | ||
70 | } | 73 | } |
71 | 74 | ||
72 | public Hashtable FreeSwitchConfigHTTPHandler(Hashtable request) | 75 | public Hashtable FreeSwitchConfigHTTPHandler(Hashtable request) |
73 | { | 76 | { |
74 | Hashtable response = new Hashtable(); | 77 | Hashtable response = new Hashtable(); |
75 | response["str_response_string"] = string.Empty; | 78 | response["str_response_string"] = string.Empty; |
79 | response["content_type"] = "text/plain"; | ||
80 | response["keepalive"] = false; | ||
81 | response["int_response_code"] = 500; | ||
76 | 82 | ||
77 | Hashtable requestBody = ParseRequestBody((string) request["body"]); | 83 | Hashtable requestBody = ParseRequestBody((string) request["body"]); |
78 | 84 | ||
@@ -105,5 +111,18 @@ namespace OpenSim.Server.Handlers.Freeswitch | |||
105 | 111 | ||
106 | return bodyParams; | 112 | return bodyParams; |
107 | } | 113 | } |
114 | |||
115 | public Hashtable RegionConfigHTTPHandler(Hashtable request) | ||
116 | { | ||
117 | Hashtable response = new Hashtable(); | ||
118 | response["content_type"] = "text/json"; | ||
119 | response["keepalive"] = false; | ||
120 | response["int_response_code"] = 200; | ||
121 | |||
122 | response["str_response_string"] = m_FreeswitchService.GetJsonConfig(); | ||
123 | |||
124 | return response; | ||
125 | } | ||
126 | |||
108 | } | 127 | } |
109 | } | 128 | } |