aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/FreeswitchService/FreeswitchService.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-04-19 21:54:26 +0100
committerJustin Clark-Casey (justincc)2011-04-19 21:54:26 +0100
commit2fa210243b64bb10fbca37f89176f10efeb25f41 (patch)
treec4e69514df1fba5165d274332c42361e04249c92 /OpenSim/Services/FreeswitchService/FreeswitchService.cs
parentMove mesh on/off swtich from [Startup] to [Mesh] in anticipation of future co... (diff)
downloadopensim-SC_OLD-2fa210243b64bb10fbca37f89176f10efeb25f41.zip
opensim-SC_OLD-2fa210243b64bb10fbca37f89176f10efeb25f41.tar.gz
opensim-SC_OLD-2fa210243b64bb10fbca37f89176f10efeb25f41.tar.bz2
opensim-SC_OLD-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/Services/FreeswitchService/FreeswitchService.cs')
-rw-r--r--OpenSim/Services/FreeswitchService/FreeswitchService.cs29
1 files changed, 16 insertions, 13 deletions
diff --git a/OpenSim/Services/FreeswitchService/FreeswitchService.cs b/OpenSim/Services/FreeswitchService/FreeswitchService.cs
index fe6f5cd..1ec89da 100644
--- a/OpenSim/Services/FreeswitchService/FreeswitchService.cs
+++ b/OpenSim/Services/FreeswitchService/FreeswitchService.cs
@@ -50,13 +50,13 @@ namespace OpenSim.Services.FreeswitchService
50 50
51 public Hashtable HandleDialplanRequest(Hashtable request) 51 public Hashtable HandleDialplanRequest(Hashtable request)
52 { 52 {
53 m_log.DebugFormat("[FreeSwitchVoice] HandleDialplanRequest called with {0}",request.ToString()); 53 m_log.DebugFormat("[FreeSwitchVoice]: HandleDialplanRequest called with {0}",request.ToString());
54 54
55 Hashtable response = new Hashtable(); 55 Hashtable response = new Hashtable();
56 56
57 foreach (DictionaryEntry item in request) 57 foreach (DictionaryEntry item in request)
58 { 58 {
59 m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}",item.Key, item.Value); 59 m_log.InfoFormat("[FreeSwitchDirectory]: requestBody item {0} {1}",item.Key, item.Value);
60 } 60 }
61 61
62 string requestcontext = (string) request["Hunt-Context"]; 62 string requestcontext = (string) request["Hunt-Context"];
@@ -66,7 +66,7 @@ namespace OpenSim.Services.FreeswitchService
66 66
67 if (m_freeSwitchContext != String.Empty && m_freeSwitchContext != requestcontext) 67 if (m_freeSwitchContext != String.Empty && m_freeSwitchContext != requestcontext)
68 { 68 {
69 m_log.Debug("[FreeSwitchDirectory] returning empty as it's for another context"); 69 m_log.Debug("[FreeSwitchDirectory]: returning empty as it's for another context");
70 response["str_response_string"] = ""; 70 response["str_response_string"] = "";
71 } 71 }
72 else 72 else
@@ -116,13 +116,16 @@ namespace OpenSim.Services.FreeswitchService
116 { 116 {
117 Hashtable response = new Hashtable(); 117 Hashtable response = new Hashtable();
118 string domain = (string) request["domain"]; 118 string domain = (string) request["domain"];
119 if (domain != m_freeSwitchRealm) { 119 if (domain != m_freeSwitchRealm)
120 {
120 response["content_type"] = "text/xml"; 121 response["content_type"] = "text/xml";
121 response["keepalive"] = false; 122 response["keepalive"] = false;
122 response["int_response_code"] = 200; 123 response["int_response_code"] = 200;
123 response["str_response_string"] = ""; 124 response["str_response_string"] = "";
124 } else { 125 }
125 m_log.DebugFormat("[FreeSwitchDirectory] HandleDirectoryRequest called with {0}",request.ToString()); 126 else
127 {
128// m_log.DebugFormat("[FreeSwitchDirectory]: HandleDirectoryRequest called with {0}",request.ToString());
126 129
127 // information in the request we might be interested in 130 // information in the request we might be interested in
128 131
@@ -145,7 +148,7 @@ namespace OpenSim.Services.FreeswitchService
145 148
146 foreach (DictionaryEntry item in request) 149 foreach (DictionaryEntry item in request)
147 { 150 {
148 m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}", item.Key, item.Value); 151 m_log.DebugFormat("[FreeSwitchDirectory]: requestBody item {0} {1}", item.Key, item.Value);
149 } 152 }
150 153
151 string eventCallingFunction = (string) request["Event-Calling-Function"]; 154 string eventCallingFunction = (string) request["Event-Calling-Function"];
@@ -173,7 +176,7 @@ namespace OpenSim.Services.FreeswitchService
173 } 176 }
174 else 177 else
175 { 178 {
176 m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod); 179 m_log.ErrorFormat("[FreeSwitchVoice]: HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod);
177 response["int_response_code"] = 404; 180 response["int_response_code"] = 404;
178 response["content_type"] = "text/xml"; 181 response["content_type"] = "text/xml";
179 response["str_response_string"] = ""; 182 response["str_response_string"] = "";
@@ -205,7 +208,7 @@ namespace OpenSim.Services.FreeswitchService
205 } 208 }
206 else 209 else
207 { 210 {
208 m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown Event-Calling-Function {0}",eventCallingFunction); 211 m_log.ErrorFormat("[FreeSwitchVoice]: HandleDirectoryRequest unknown Event-Calling-Function {0}",eventCallingFunction);
209 response["int_response_code"] = 404; 212 response["int_response_code"] = 404;
210 response["keepalive"] = false; 213 response["keepalive"] = false;
211 response["content_type"] = "text/xml"; 214 response["content_type"] = "text/xml";
@@ -217,7 +220,7 @@ namespace OpenSim.Services.FreeswitchService
217 220
218 private Hashtable HandleRegister(string Context, string Realm, Hashtable request) 221 private Hashtable HandleRegister(string Context, string Realm, Hashtable request)
219 { 222 {
220 m_log.Info("[FreeSwitchDirectory] HandleRegister called"); 223 m_log.Info("[FreeSwitchDirectory]: HandleRegister called");
221 224
222 // TODO the password we return needs to match that sent in the request, this is hard coded for now 225 // TODO the password we return needs to match that sent in the request, this is hard coded for now
223 string password = "1234"; 226 string password = "1234";
@@ -254,7 +257,7 @@ namespace OpenSim.Services.FreeswitchService
254 257
255 private Hashtable HandleInvite(string Context, string Realm, Hashtable request) 258 private Hashtable HandleInvite(string Context, string Realm, Hashtable request)
256 { 259 {
257 m_log.Info("[FreeSwitchDirectory] HandleInvite called"); 260 m_log.Info("[FreeSwitchDirectory]: HandleInvite called");
258 261
259 // TODO the password we return needs to match that sent in the request, this is hard coded for now 262 // TODO the password we return needs to match that sent in the request, this is hard coded for now
260 string password = "1234"; 263 string password = "1234";
@@ -301,7 +304,7 @@ namespace OpenSim.Services.FreeswitchService
301 304
302 private Hashtable HandleLocateUser(String Realm, Hashtable request) 305 private Hashtable HandleLocateUser(String Realm, Hashtable request)
303 { 306 {
304 m_log.Info("[FreeSwitchDirectory] HandleLocateUser called"); 307 m_log.Info("[FreeSwitchDirectory]: HandleLocateUser called");
305 308
306 // TODO the password we return needs to match that sent in the request, this is hard coded for now 309 // TODO the password we return needs to match that sent in the request, this is hard coded for now
307 string domain = (string) request["domain"]; 310 string domain = (string) request["domain"];
@@ -335,7 +338,7 @@ namespace OpenSim.Services.FreeswitchService
335 338
336 private Hashtable HandleConfigSofia(string Context, string Realm, Hashtable request) 339 private Hashtable HandleConfigSofia(string Context, string Realm, Hashtable request)
337 { 340 {
338 m_log.Info("[FreeSwitchDirectory] HandleConfigSofia called"); 341 m_log.Info("[FreeSwitchDirectory]: HandleConfigSofia called.");
339 342
340 // TODO the password we return needs to match that sent in the request, this is hard coded for now 343 // TODO the password we return needs to match that sent in the request, this is hard coded for now
341 string domain = (string) request["domain"]; 344 string domain = (string) request["domain"];