diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs index 3e8a433..d00a256 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs | |||
@@ -48,6 +48,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.SIPVoice | |||
48 | 48 | ||
49 | private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; | 49 | private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; |
50 | private static readonly string m_provisionVoiceAccountRequestPath = "0008/"; | 50 | private static readonly string m_provisionVoiceAccountRequestPath = "0008/"; |
51 | private static readonly string m_chatSessionRequestPath = "0009/"; | ||
51 | private IConfig m_config; | 52 | private IConfig m_config; |
52 | private Scene m_scene; | 53 | private Scene m_scene; |
53 | private string m_sipDomain; | 54 | private string m_sipDomain; |
@@ -118,6 +119,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.SIPVoice | |||
118 | return ProvisionVoiceAccountRequest(request, path, param, | 119 | return ProvisionVoiceAccountRequest(request, path, param, |
119 | agentID, caps); | 120 | agentID, caps); |
120 | })); | 121 | })); |
122 | caps.RegisterHandler("ChatSessionRequest", | ||
123 | new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath, | ||
124 | delegate(string request, string path, string param, | ||
125 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | ||
126 | { | ||
127 | return ChatSessionRequest(request, path, param, | ||
128 | agentID, caps); | ||
129 | })); | ||
130 | |||
121 | } | 131 | } |
122 | 132 | ||
123 | /// <summary> | 133 | /// <summary> |
@@ -198,5 +208,27 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.SIPVoice | |||
198 | 208 | ||
199 | return null; | 209 | return null; |
200 | } | 210 | } |
211 | |||
212 | /// <summary> | ||
213 | /// Callback for a client request for ParcelVoiceInfo | ||
214 | /// </summary> | ||
215 | /// <param name="scene">current scene object of the client</param> | ||
216 | /// <param name="request"></param> | ||
217 | /// <param name="path"></param> | ||
218 | /// <param name="param"></param> | ||
219 | /// <param name="agentID"></param> | ||
220 | /// <param name="caps"></param> | ||
221 | /// <returns></returns> | ||
222 | public string ChatSessionRequest(string request, string path, string param, | ||
223 | UUID agentID, Caps caps) | ||
224 | { | ||
225 | ScenePresence avatar = m_scene.GetScenePresence(agentID); | ||
226 | string avatarName = avatar.Name; | ||
227 | |||
228 | m_log.DebugFormat("[CAPS][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}", | ||
229 | avatarName, request, path, param); | ||
230 | return "<llsd>true</llsd>"; | ||
231 | } | ||
232 | |||
201 | } | 233 | } |
202 | } | 234 | } |