diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar')
7 files changed, 70 insertions, 21 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs index c49d942..773507c 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs | |||
@@ -351,7 +351,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
351 | { | 351 | { |
352 | m_log.DebugFormat("[IRC-Region {0}] dropping message {1} on channel {2}", Region, msg, msg.Channel); | 352 | m_log.DebugFormat("[IRC-Region {0}] dropping message {1} on channel {2}", Region, msg, msg.Channel); |
353 | return; | 353 | return; |
354 | } | 354 | } |
355 | 355 | ||
356 | ScenePresence avatar = null; | 356 | ScenePresence avatar = null; |
357 | string fromName = msg.From; | 357 | string fromName = msg.From; |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs index 9ba09ed..46ad30f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs | |||
@@ -97,8 +97,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
97 | </document>", Context, Realm); | 97 | </document>", Context, Realm); |
98 | } | 98 | } |
99 | 99 | ||
100 | return response; | 100 | return response; |
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
104 | } | 104 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs index 5d90a8f..17cdf74 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs | |||
@@ -93,7 +93,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
93 | { | 93 | { |
94 | response = HandleRegister(Context, Realm, request); | 94 | response = HandleRegister(Context, Realm, request); |
95 | } | 95 | } |
96 | else if (sipAuthMethod == "INVITE") | 96 | else if (sipAuthMethod == "INVITE") |
97 | { | 97 | { |
98 | response = HandleInvite(Context, Realm, request); | 98 | response = HandleInvite(Context, Realm, request); |
99 | } | 99 | } |
@@ -138,7 +138,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
138 | response["str_response_string"] = ""; | 138 | response["str_response_string"] = ""; |
139 | } | 139 | } |
140 | } | 140 | } |
141 | return response; | 141 | return response; |
142 | } | 142 | } |
143 | 143 | ||
144 | private Hashtable HandleRegister(string Context, string Realm, Hashtable request) | 144 | private Hashtable HandleRegister(string Context, string Realm, Hashtable request) |
@@ -309,17 +309,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
309 | "</document>\r\n", | 309 | "</document>\r\n", |
310 | domain, Context); | 310 | domain, Context); |
311 | 311 | ||
312 | return response; | 312 | return response; |
313 | } | 313 | } |
314 | 314 | ||
315 | 315 | ||
316 | // private Hashtable HandleLoadNetworkLists(Hashtable request) | 316 | // private Hashtable HandleLoadNetworkLists(Hashtable request) |
317 | // { | 317 | // { |
318 | // m_log.Info("[FreeSwitchDirectory] HandleLoadNetworkLists called"); | 318 | // m_log.Info("[FreeSwitchDirectory] HandleLoadNetworkLists called"); |
319 | // | 319 | // |
320 | // // TODO the password we return needs to match that sent in the request, this is hard coded for now | 320 | // // TODO the password we return needs to match that sent in the request, this is hard coded for now |
321 | // string domain = (string) request["domain"]; | 321 | // string domain = (string) request["domain"]; |
322 | // | 322 | // |
323 | // Hashtable response = new Hashtable(); | 323 | // Hashtable response = new Hashtable(); |
324 | // response["content_type"] = "text/xml"; | 324 | // response["content_type"] = "text/xml"; |
325 | // response["keepalive"] = false; | 325 | // response["keepalive"] = false; |
@@ -340,9 +340,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
340 | // "</section>\r\n" + | 340 | // "</section>\r\n" + |
341 | // "</document>\r\n", | 341 | // "</document>\r\n", |
342 | // domain); | 342 | // domain); |
343 | // | 343 | // |
344 | // | 344 | // |
345 | // return response; | 345 | // return response; |
346 | // } | 346 | // } |
347 | } | 347 | } |
348 | } | 348 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 65c5274..c7bb56a 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -53,7 +53,7 @@ using System.Text.RegularExpressions; | |||
53 | 53 | ||
54 | namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | 54 | namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice |
55 | { | 55 | { |
56 | public class FreeSwitchVoiceModule : IRegionModule | 56 | public class FreeSwitchVoiceModule : IRegionModule, IVoiceModule |
57 | { | 57 | { |
58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
59 | 59 | ||
@@ -101,13 +101,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
101 | private FreeSwitchDialplan m_FreeSwitchDialplan; | 101 | private FreeSwitchDialplan m_FreeSwitchDialplan; |
102 | 102 | ||
103 | private readonly Dictionary<string, string> m_UUIDName = new Dictionary<string, string>(); | 103 | private readonly Dictionary<string, string> m_UUIDName = new Dictionary<string, string>(); |
104 | private Dictionary<string, string> m_ParcelAddress = new Dictionary<string, string>(); | ||
105 | |||
106 | private Scene m_scene; | ||
104 | 107 | ||
105 | 108 | ||
106 | private IConfig m_config; | 109 | private IConfig m_config; |
107 | 110 | ||
108 | public void Initialise(Scene scene, IConfigSource config) | 111 | public void Initialise(Scene scene, IConfigSource config) |
109 | { | 112 | { |
110 | 113 | m_scene = scene; | |
111 | m_config = config.Configs["FreeSwitchVoice"]; | 114 | m_config = config.Configs["FreeSwitchVoice"]; |
112 | 115 | ||
113 | if (null == m_config) | 116 | if (null == m_config) |
@@ -230,6 +233,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
230 | { | 233 | { |
231 | OnRegisterCaps(scene, agentID, caps); | 234 | OnRegisterCaps(scene, agentID, caps); |
232 | }; | 235 | }; |
236 | |||
237 | |||
233 | 238 | ||
234 | try | 239 | try |
235 | { | 240 | { |
@@ -255,6 +260,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
255 | 260 | ||
256 | public void PostInitialise() | 261 | public void PostInitialise() |
257 | { | 262 | { |
263 | if (m_pluginEnabled) | ||
264 | { | ||
265 | m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene"); | ||
266 | |||
267 | // register the voice interface for this module, so the script engine can call us | ||
268 | m_scene.RegisterModuleInterface<IVoiceModule>(this); | ||
269 | } | ||
258 | } | 270 | } |
259 | 271 | ||
260 | public void Close() | 272 | public void Close() |
@@ -270,7 +282,27 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
270 | { | 282 | { |
271 | get { return true; } | 283 | get { return true; } |
272 | } | 284 | } |
273 | 285 | ||
286 | // <summary> | ||
287 | // implementation of IVoiceModule, called by osSetParcelSIPAddress script function | ||
288 | // </summary> | ||
289 | public void setLandSIPAddress(string SIPAddress,UUID GlobalID) | ||
290 | { | ||
291 | m_log.DebugFormat("[FreeSwitchVoice]: setLandSIPAddress parcel id {0}: setting sip address {1}", | ||
292 | GlobalID, SIPAddress); | ||
293 | |||
294 | lock (m_ParcelAddress) | ||
295 | { | ||
296 | if (m_ParcelAddress.ContainsKey(GlobalID.ToString())) | ||
297 | { | ||
298 | m_ParcelAddress[GlobalID.ToString()] = SIPAddress; | ||
299 | } | ||
300 | else | ||
301 | { | ||
302 | m_ParcelAddress.Add(GlobalID.ToString(), SIPAddress); | ||
303 | } | ||
304 | } | ||
305 | } | ||
274 | 306 | ||
275 | // <summary> | 307 | // <summary> |
276 | // OnRegisterCaps is invoked via the scene.EventManager | 308 | // OnRegisterCaps is invoked via the scene.EventManager |
@@ -776,6 +808,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
776 | 808 | ||
777 | // Create parcel voice channel. If no parcel exists, then the voice channel ID is the same | 809 | // Create parcel voice channel. If no parcel exists, then the voice channel ID is the same |
778 | // as the directory ID. Otherwise, it reflects the parcel's ID. | 810 | // as the directory ID. Otherwise, it reflects the parcel's ID. |
811 | |||
812 | lock (m_ParcelAddress) | ||
813 | { | ||
814 | if (m_ParcelAddress.ContainsKey(land.GlobalID.ToString())) | ||
815 | { | ||
816 | m_log.DebugFormat("[FreeSwitchVoice]: parcel id {0}: using sip address {1}", | ||
817 | land.GlobalID, m_ParcelAddress[land.GlobalID.ToString()]); | ||
818 | return m_ParcelAddress[land.GlobalID.ToString()]; | ||
819 | } | ||
820 | } | ||
779 | 821 | ||
780 | if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0) | 822 | if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0) |
781 | { | 823 | { |
@@ -797,6 +839,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
797 | // 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. | 839 | // 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. |
798 | channelUri = String.Format("sip:conf-{0}@{1}", "x" + Convert.ToBase64String(encoding.GetBytes(landUUID)), m_freeSwitchRealm); | 840 | channelUri = String.Format("sip:conf-{0}@{1}", "x" + Convert.ToBase64String(encoding.GetBytes(landUUID)), m_freeSwitchRealm); |
799 | 841 | ||
842 | lock (m_ParcelAddress) | ||
843 | { | ||
844 | if (!m_ParcelAddress.ContainsKey(land.GlobalID.ToString())) | ||
845 | { | ||
846 | m_ParcelAddress.Add(land.GlobalID.ToString(),channelUri); | ||
847 | } | ||
848 | } | ||
800 | 849 | ||
801 | return channelUri; | 850 | return channelUri; |
802 | } | 851 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index febb491..cb76200 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | |||
@@ -226,7 +226,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
226 | m_log.DebugFormat("[VivoxVoice] plugin initialization failed: {0}", e.ToString()); | 226 | m_log.DebugFormat("[VivoxVoice] plugin initialization failed: {0}", e.ToString()); |
227 | return; | 227 | return; |
228 | } | 228 | } |
229 | } | 229 | } |
230 | 230 | ||
231 | 231 | ||
232 | // Called to indicate that the module has been added to the region | 232 | // Called to indicate that the module has been added to the region |
@@ -1144,7 +1144,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
1144 | // Otherwise prepare the request | 1144 | // Otherwise prepare the request |
1145 | m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); | 1145 | m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); |
1146 | 1146 | ||
1147 | HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); | 1147 | HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); |
1148 | HttpWebResponse rsp = null; | 1148 | HttpWebResponse rsp = null; |
1149 | 1149 | ||
1150 | // We are sending just parameters, no content | 1150 | // We are sending just parameters, no content |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index d5cbfd4..2e89a24 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -477,7 +477,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
477 | foreach (string key in binBucketOSD.Keys) | 477 | foreach (string key in binBucketOSD.Keys) |
478 | { | 478 | { |
479 | m_log.WarnFormat("{0}: {1}", key, binBucketOSD[key].ToString()); | 479 | m_log.WarnFormat("{0}: {1}", key, binBucketOSD[key].ToString()); |
480 | } | 480 | } |
481 | } | 481 | } |
482 | 482 | ||
483 | // treat as if no attachment | 483 | // treat as if no attachment |
@@ -1261,7 +1261,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1261 | { | 1261 | { |
1262 | if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 1262 | if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
1263 | 1263 | ||
1264 | // TODO: Probably isn't nessesary to update every client in every scene. | 1264 | // TODO: Probably isn't nessesary to update every client in every scene. |
1265 | // Need to examine client updates and do only what's nessesary. | 1265 | // Need to examine client updates and do only what's nessesary. |
1266 | lock (m_sceneList) | 1266 | lock (m_sceneList) |
1267 | { | 1267 | { |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index 805c3d4..964d0bb 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | |||
@@ -871,7 +871,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
871 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function); | 871 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function); |
872 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString()); | 872 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString()); |
873 | 873 | ||
874 | foreach( string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine },StringSplitOptions.None)) | 874 | foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine },StringSplitOptions.None)) |
875 | { | 875 | { |
876 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", ResponseLine); | 876 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", ResponseLine); |
877 | } | 877 | } |