aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/FreeswitchService/FreeswitchService.cs33
-rw-r--r--OpenSim/Services/FreeswitchService/FreeswitchServiceBase.cs2
2 files changed, 18 insertions, 17 deletions
diff --git a/OpenSim/Services/FreeswitchService/FreeswitchService.cs b/OpenSim/Services/FreeswitchService/FreeswitchService.cs
index fe6f5cd..c3f1056 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
@@ -143,10 +146,8 @@ namespace OpenSim.Services.FreeswitchService
143 //domain=9.20.151.43 146 //domain=9.20.151.43
144 //ip=9.167.220.137 // this is the correct IP rather than sip_contact_host above when through a vpn or NAT setup 147 //ip=9.167.220.137 // this is the correct IP rather than sip_contact_host above when through a vpn or NAT setup
145 148
146 foreach (DictionaryEntry item in request) 149// foreach (DictionaryEntry item in request)
147 { 150// m_log.DebugFormat("[FreeSwitchDirectory]: requestBody item {0} {1}", item.Key, item.Value);
148 m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}", item.Key, item.Value);
149 }
150 151
151 string eventCallingFunction = (string) request["Event-Calling-Function"]; 152 string eventCallingFunction = (string) request["Event-Calling-Function"];
152 if (eventCallingFunction == null) 153 if (eventCallingFunction == null)
@@ -173,7 +174,7 @@ namespace OpenSim.Services.FreeswitchService
173 } 174 }
174 else 175 else
175 { 176 {
176 m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod); 177 m_log.ErrorFormat("[FreeSwitchVoice]: HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod);
177 response["int_response_code"] = 404; 178 response["int_response_code"] = 404;
178 response["content_type"] = "text/xml"; 179 response["content_type"] = "text/xml";
179 response["str_response_string"] = ""; 180 response["str_response_string"] = "";
@@ -205,7 +206,7 @@ namespace OpenSim.Services.FreeswitchService
205 } 206 }
206 else 207 else
207 { 208 {
208 m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown Event-Calling-Function {0}",eventCallingFunction); 209 m_log.ErrorFormat("[FreeSwitchVoice]: HandleDirectoryRequest unknown Event-Calling-Function {0}",eventCallingFunction);
209 response["int_response_code"] = 404; 210 response["int_response_code"] = 404;
210 response["keepalive"] = false; 211 response["keepalive"] = false;
211 response["content_type"] = "text/xml"; 212 response["content_type"] = "text/xml";
@@ -217,7 +218,7 @@ namespace OpenSim.Services.FreeswitchService
217 218
218 private Hashtable HandleRegister(string Context, string Realm, Hashtable request) 219 private Hashtable HandleRegister(string Context, string Realm, Hashtable request)
219 { 220 {
220 m_log.Info("[FreeSwitchDirectory] HandleRegister called"); 221 m_log.Info("[FreeSwitchDirectory]: HandleRegister called");
221 222
222 // TODO the password we return needs to match that sent in the request, this is hard coded for now 223 // TODO the password we return needs to match that sent in the request, this is hard coded for now
223 string password = "1234"; 224 string password = "1234";
@@ -254,7 +255,7 @@ namespace OpenSim.Services.FreeswitchService
254 255
255 private Hashtable HandleInvite(string Context, string Realm, Hashtable request) 256 private Hashtable HandleInvite(string Context, string Realm, Hashtable request)
256 { 257 {
257 m_log.Info("[FreeSwitchDirectory] HandleInvite called"); 258 m_log.Info("[FreeSwitchDirectory]: HandleInvite called");
258 259
259 // TODO the password we return needs to match that sent in the request, this is hard coded for now 260 // TODO the password we return needs to match that sent in the request, this is hard coded for now
260 string password = "1234"; 261 string password = "1234";
@@ -301,7 +302,7 @@ namespace OpenSim.Services.FreeswitchService
301 302
302 private Hashtable HandleLocateUser(String Realm, Hashtable request) 303 private Hashtable HandleLocateUser(String Realm, Hashtable request)
303 { 304 {
304 m_log.Info("[FreeSwitchDirectory] HandleLocateUser called"); 305 m_log.Info("[FreeSwitchDirectory]: HandleLocateUser called");
305 306
306 // TODO the password we return needs to match that sent in the request, this is hard coded for now 307 // 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"]; 308 string domain = (string) request["domain"];
@@ -335,7 +336,7 @@ namespace OpenSim.Services.FreeswitchService
335 336
336 private Hashtable HandleConfigSofia(string Context, string Realm, Hashtable request) 337 private Hashtable HandleConfigSofia(string Context, string Realm, Hashtable request)
337 { 338 {
338 m_log.Info("[FreeSwitchDirectory] HandleConfigSofia called"); 339 m_log.Info("[FreeSwitchDirectory]: HandleConfigSofia called.");
339 340
340 // TODO the password we return needs to match that sent in the request, this is hard coded for now 341 // 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"]; 342 string domain = (string) request["domain"];
diff --git a/OpenSim/Services/FreeswitchService/FreeswitchServiceBase.cs b/OpenSim/Services/FreeswitchService/FreeswitchServiceBase.cs
index ebbb1b0..25c18b6 100644
--- a/OpenSim/Services/FreeswitchService/FreeswitchServiceBase.cs
+++ b/OpenSim/Services/FreeswitchService/FreeswitchServiceBase.cs
@@ -64,7 +64,7 @@ namespace OpenSim.Services.FreeswitchService
64 m_freeSwitchDefaultWellKnownIP = freeswitchConfig.GetString("ServerAddress", String.Empty); 64 m_freeSwitchDefaultWellKnownIP = freeswitchConfig.GetString("ServerAddress", String.Empty);
65 if (m_freeSwitchDefaultWellKnownIP == String.Empty) 65 if (m_freeSwitchDefaultWellKnownIP == String.Empty)
66 { 66 {
67 m_log.Error("[FREESWITCH]: No FreeswitchServerAddress given, can't continue"); 67 m_log.Error("[FREESWITCH]: No ServerAddress given, cannot start service.");
68 return; 68 return;
69 } 69 }
70 70