diff options
author | Justin Clark-Casey (justincc) | 2011-04-19 21:54:26 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-04-19 21:54:26 +0100 |
commit | 2fa210243b64bb10fbca37f89176f10efeb25f41 (patch) | |
tree | c4e69514df1fba5165d274332c42361e04249c92 /OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice | |
parent | Move mesh on/off swtich from [Startup] to [Mesh] in anticipation of future co... (diff) | |
download | opensim-SC-2fa210243b64bb10fbca37f89176f10efeb25f41.zip opensim-SC-2fa210243b64bb10fbca37f89176f10efeb25f41.tar.gz opensim-SC-2fa210243b64bb10fbca37f89176f10efeb25f41.tar.bz2 opensim-SC-2fa210243b64bb10fbca37f89176f10efeb25f41.tar.xz |
Clean up freeswitch config to what is currently required. Add explanation to config parameters. Clean up some log messages.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 7909d8a..962b5ca 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -118,7 +118,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
118 | 118 | ||
119 | if (serviceDll == String.Empty) | 119 | if (serviceDll == String.Empty) |
120 | { | 120 | { |
121 | m_log.Error("[FreeSwitchVoice]: No LocalServiceModule named in section FreeSwitchVoice"); | 121 | m_log.Error("[FreeSwitchVoice]: No LocalServiceModule named in section FreeSwitchVoice. Not starting."); |
122 | return; | 122 | return; |
123 | } | 123 | } |
124 | 124 | ||
@@ -143,8 +143,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
143 | if (String.IsNullOrEmpty(m_freeSwitchRealm) || | 143 | if (String.IsNullOrEmpty(m_freeSwitchRealm) || |
144 | String.IsNullOrEmpty(m_freeSwitchAPIPrefix)) | 144 | String.IsNullOrEmpty(m_freeSwitchAPIPrefix)) |
145 | { | 145 | { |
146 | m_log.Error("[FreeSwitchVoice] plugin mis-configured"); | 146 | m_log.Error("[FreeSwitchVoice]: Freeswitch service mis-configured. Not starting."); |
147 | m_log.Info("[FreeSwitchVoice] plugin disabled: incomplete configuration"); | ||
148 | return; | 147 | return; |
149 | } | 148 | } |
150 | 149 | ||
@@ -172,16 +171,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
172 | MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix), | 171 | MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix), |
173 | FreeSwitchSLVoiceBuddyHTTPHandler); | 172 | FreeSwitchSLVoiceBuddyHTTPHandler); |
174 | 173 | ||
175 | m_log.InfoFormat("[FreeSwitchVoice] using FreeSwitch server {0}", m_freeSwitchRealm); | 174 | m_log.InfoFormat("[FreeSwitchVoice]: using FreeSwitch server {0}", m_freeSwitchRealm); |
176 | 175 | ||
177 | m_Enabled = true; | 176 | m_Enabled = true; |
178 | 177 | ||
179 | m_log.Info("[FreeSwitchVoice] plugin enabled"); | 178 | m_log.Info("[FreeSwitchVoice]: plugin enabled"); |
180 | } | 179 | } |
181 | catch (Exception e) | 180 | catch (Exception e) |
182 | { | 181 | { |
183 | m_log.ErrorFormat("[FreeSwitchVoice] plugin initialization failed: {0}", e.Message); | 182 | m_log.ErrorFormat("[FreeSwitchVoice]: plugin initialization failed: {0} {1}", e.Message, e.StackTrace); |
184 | m_log.DebugFormat("[FreeSwitchVoice] plugin initialization failed: {0}", e.ToString()); | ||
185 | return; | 183 | return; |
186 | } | 184 | } |
187 | 185 | ||
@@ -240,7 +238,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
240 | { | 238 | { |
241 | if (m_Enabled) | 239 | if (m_Enabled) |
242 | { | 240 | { |
243 | m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene"); | 241 | m_log.Info("[FreeSwitchVoice]: registering IVoiceModule with the scene"); |
244 | 242 | ||
245 | // register the voice interface for this module, so the script engine can call us | 243 | // register the voice interface for this module, so the script engine can call us |
246 | scene.RegisterModuleInterface<IVoiceModule>(this); | 244 | scene.RegisterModuleInterface<IVoiceModule>(this); |
@@ -302,7 +300,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
302 | // </summary> | 300 | // </summary> |
303 | public void OnRegisterCaps(Scene scene, UUID agentID, Caps caps) | 301 | public void OnRegisterCaps(Scene scene, UUID agentID, Caps caps) |
304 | { | 302 | { |
305 | m_log.DebugFormat("[FreeSwitchVoice] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); | 303 | m_log.DebugFormat( |
304 | "[FreeSwitchVoice]: OnRegisterCaps called with agentID {0} caps {1} in scene {2}", | ||
305 | agentID, caps, scene.RegionInfo.RegionName); | ||
306 | 306 | ||
307 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | 307 | string capsBase = "/CAPS/" + caps.CapsObjectPath; |
308 | caps.RegisterHandler("ProvisionVoiceAccountRequest", | 308 | caps.RegisterHandler("ProvisionVoiceAccountRequest", |
@@ -558,7 +558,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
558 | 558 | ||
559 | public Hashtable FreeSwitchSLVoiceGetPreloginHTTPHandler(Hashtable request) | 559 | public Hashtable FreeSwitchSLVoiceGetPreloginHTTPHandler(Hashtable request) |
560 | { | 560 | { |
561 | m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceGetPreloginHTTPHandler called"); | 561 | m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceGetPreloginHTTPHandler called"); |
562 | 562 | ||
563 | Hashtable response = new Hashtable(); | 563 | Hashtable response = new Hashtable(); |
564 | response["content_type"] = "text/xml"; | 564 | response["content_type"] = "text/xml"; |
@@ -664,7 +664,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
664 | 664 | ||
665 | public Hashtable FreeSwitchSLVoiceSigninHTTPHandler(Hashtable request) | 665 | public Hashtable FreeSwitchSLVoiceSigninHTTPHandler(Hashtable request) |
666 | { | 666 | { |
667 | m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceSigninHTTPHandler called"); | 667 | m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceSigninHTTPHandler called"); |
668 | // string requestbody = (string)request["body"]; | 668 | // string requestbody = (string)request["body"]; |
669 | // string uri = (string)request["uri"]; | 669 | // string uri = (string)request["uri"]; |
670 | // string contenttype = (string)request["content-type"]; | 670 | // string contenttype = (string)request["content-type"]; |
@@ -795,16 +795,18 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
795 | response["keepalive"] = false; | 795 | response["keepalive"] = false; |
796 | response["int_response_code"] = 500; | 796 | response["int_response_code"] = 500; |
797 | 797 | ||
798 | Hashtable requestBody = ParseRequestBody((string) request["body"]); | 798 | Hashtable requestBody = ParseRequestBody((string)request["body"]); |
799 | 799 | ||
800 | string section = (string) requestBody["section"]; | 800 | string section = (string) requestBody["section"]; |
801 | |||
802 | m_log.DebugFormat("[FreeSwitchVoice]: Received request for config section {0}", section); | ||
801 | 803 | ||
802 | if (section == "directory") | 804 | if (section == "directory") |
803 | response = m_FreeswitchService.HandleDirectoryRequest(requestBody); | 805 | response = m_FreeswitchService.HandleDirectoryRequest(requestBody); |
804 | else if (section == "dialplan") | 806 | else if (section == "dialplan") |
805 | response = m_FreeswitchService.HandleDialplanRequest(requestBody); | 807 | response = m_FreeswitchService.HandleDialplanRequest(requestBody); |
806 | else | 808 | else |
807 | m_log.WarnFormat("[FreeSwitchVoice]: section was {0}", section); | 809 | m_log.WarnFormat("[FreeSwitchVoice]: Unknown section {0} was requested.", section); |
808 | 810 | ||
809 | return response; | 811 | return response; |
810 | } | 812 | } |