diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 8af3652..7b20446 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -306,30 +306,35 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
306 | agentID, caps, scene.RegionInfo.RegionName); | 306 | agentID, caps, scene.RegionInfo.RegionName); |
307 | 307 | ||
308 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | 308 | string capsBase = "/CAPS/" + caps.CapsObjectPath; |
309 | caps.RegisterHandler("ProvisionVoiceAccountRequest", | 309 | caps.RegisterHandler( |
310 | new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath, | 310 | "ProvisionVoiceAccountRequest", |
311 | delegate(string request, string path, string param, | 311 | new RestStreamHandler( |
312 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 312 | "POST", |
313 | { | 313 | capsBase + m_provisionVoiceAccountRequestPath, |
314 | return ProvisionVoiceAccountRequest(scene, request, path, param, | 314 | (request, path, param, httpRequest, httpResponse) |
315 | agentID, caps); | 315 | => ProvisionVoiceAccountRequest(scene, request, path, param, agentID, caps), |
316 | })); | 316 | "ProvisionVoiceAccountRequest", |
317 | caps.RegisterHandler("ParcelVoiceInfoRequest", | 317 | agentID.ToString())); |
318 | new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath, | 318 | |
319 | delegate(string request, string path, string param, | 319 | caps.RegisterHandler( |
320 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 320 | "ParcelVoiceInfoRequest", |
321 | { | 321 | new RestStreamHandler( |
322 | return ParcelVoiceInfoRequest(scene, request, path, param, | 322 | "POST", |
323 | agentID, caps); | 323 | capsBase + m_parcelVoiceInfoRequestPath, |
324 | })); | 324 | (request, path, param, httpRequest, httpResponse) |
325 | caps.RegisterHandler("ChatSessionRequest", | 325 | => ParcelVoiceInfoRequest(scene, request, path, param, agentID, caps), |
326 | new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath, | 326 | "ParcelVoiceInfoRequest", |
327 | delegate(string request, string path, string param, | 327 | agentID.ToString())); |
328 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 328 | |
329 | { | 329 | caps.RegisterHandler( |
330 | return ChatSessionRequest(scene, request, path, param, | 330 | "ChatSessionRequest", |
331 | agentID, caps); | 331 | new RestStreamHandler( |
332 | })); | 332 | "POST", |
333 | capsBase + m_chatSessionRequestPath, | ||
334 | (request, path, param, httpRequest, httpResponse) | ||
335 | => ChatSessionRequest(scene, request, path, param, agentID, caps), | ||
336 | "ChatSessionRequest", | ||
337 | agentID.ToString())); | ||
333 | } | 338 | } |
334 | 339 | ||
335 | /// <summary> | 340 | /// <summary> |
@@ -818,11 +823,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
818 | m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", | 823 | m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", |
819 | landName, land.LocalID, landUUID); | 824 | landName, land.LocalID, landUUID); |
820 | } | 825 | } |
821 | System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); | ||
822 | 826 | ||
823 | // slvoice handles the sip address differently if it begins with confctl, hiding it from the user in the friends list. however it also disables | 827 | // slvoice handles the sip address differently if it begins with confctl, hiding it from the user in the friends list. however it also disables |
824 | // the personal speech indicators as well unless some siren14-3d codec magic happens. we dont have siren143d so we'll settle for the personal speech indicator. | 828 | // the personal speech indicators as well unless some siren14-3d codec magic happens. we dont have siren143d so we'll settle for the personal speech indicator. |
825 | channelUri = String.Format("sip:conf-{0}@{1}", "x" + Convert.ToBase64String(encoding.GetBytes(landUUID)), m_freeSwitchRealm); | 829 | channelUri = String.Format("sip:conf-{0}@{1}", "x" + Convert.ToBase64String(Encoding.ASCII.GetBytes(landUUID)), m_freeSwitchRealm); |
826 | 830 | ||
827 | lock (m_ParcelAddress) | 831 | lock (m_ParcelAddress) |
828 | { | 832 | { |