aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs91
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs201
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs8
3 files changed, 160 insertions, 140 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs
index ad2b7e4..d34b6f1 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs
@@ -26,18 +26,20 @@
26 */ 26 */
27 27
28using log4net; 28using log4net;
29using System;
29using System.Reflection; 30using System.Reflection;
31using System.Text;
30using System.Collections; 32using System.Collections;
31 33
32namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice 34namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
33{ 35{
34 public class FreeSwitchDialplan 36 public class FreeSwitchDialplan
35 { 37 {
36 private static readonly ILog m_log = 38 private static readonly ILog m_log =
37 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 39 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
38 40
39 41
40 public Hashtable HandleDialplanRequest(Hashtable request) 42 public Hashtable HandleDialplanRequest(string Context, string Realm, Hashtable request)
41 { 43 {
42 m_log.DebugFormat("[FreeSwitchVoice] HandleDialplanRequest called with {0}",request.ToString()); 44 m_log.DebugFormat("[FreeSwitchVoice] HandleDialplanRequest called with {0}",request.ToString());
43 45
@@ -47,48 +49,55 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
47 { 49 {
48 m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}",item.Key, item.Value); 50 m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}",item.Key, item.Value);
49 } 51 }
50 52
53 string requestcontext = (string) request["Hunt-Context"];
51 response["content_type"] = "text/xml"; 54 response["content_type"] = "text/xml";
52 response["keepalive"] = false; 55 response["keepalive"] = false;
53 response["int_response_code"] = 200; 56 response["int_response_code"] = 200;
54 response["str_response_string"] = @"<?xml version=""1.0"" encoding=""utf-8""?> 57 if ( Context != requestcontext )
55 <document type=""freeswitch/xml""> 58 {
56 <section name=""dialplan""> 59 m_log.Debug("[FreeSwitchDirectory] returning empty as it's for another context");
57 <context name=""default""> 60 response["str_response_string"] = "";
58 61 } else {
59 <!-- dial via SIP uri --> 62 response["str_response_string"] = String.Format(@"<?xml version=""1.0"" encoding=""utf-8""?>
60 <extension name=""sip_uri""> 63 <document type=""freeswitch/xml"">
61 <condition field=""destination_number"" expression=""^sip:(.*)$""> 64 <section name=""dialplan"">
62 <action application=""bridge"" data=""sofia/${use_profile}/$1""/> 65 <context name=""{0}"">" +
63 <!--<action application=""bridge"" data=""$1""/>--> 66
64 </condition> 67/* <!-- dial via SIP uri -->
65 </extension> 68 <extension name=""sip_uri"">
66 69 <condition field=""destination_number"" expression=""^sip:(.*)$"">
67 <extension name=""opensim_conferences""> 70 <action application=""bridge"" data=""sofia/${use_profile}/$1""/>
68 <condition field=""destination_number"" expression=""^confctl-(.*)$""> 71 <!--<action application=""bridge"" data=""$1""/>-->
69 <action application=""answer""/> 72 </condition>
70 <action application=""conference"" data=""$1-${domain_name}@default""/> 73 </extension>*/
71 </condition> 74
72 </extension> 75 @"<extension name=""opensim_conferences"">
73 76 <condition field=""destination_number"" expression=""^confctl-(.*)$"">
74 <extension name=""opensim_conf""> 77 <action application=""answer""/>
75 <condition field=""destination_number"" expression=""^conf-(.*)$""> 78 <action application=""conference"" data=""$1-{1}@grid""/>
76 <action application=""answer""/> 79 </condition>
77 <action application=""conference"" data=""$1-${domain_name}@default""/> 80 </extension>
78 </condition> 81
79 </extension> 82 <extension name=""opensim_conf"">
80 83 <condition field=""destination_number"" expression=""^conf-(.*)$"">
81 <extension name=""avatar""> 84 <action application=""answer""/>
82 <condition field=""destination_number"" expression=""^(x.*)$""> 85 <action application=""conference"" data=""$1-${domain_name}@default""/>
83 <action application=""bridge"" data=""user/$1""/> 86 </condition>
84 </condition> 87 </extension>
85 </extension> 88
86 89 <extension name=""avatar"">
87 </context> 90 <condition field=""destination_number"" expression=""^(x.*)$"">
88 </section> 91 <action application=""bridge"" data=""user/$1""/>
89 </document>"; 92 </condition>
93 </extension>
94
95 </context>
96 </section>
97 </document>", Context, Realm);
98 }
90 99
91 return response; 100 return response;
92 } 101 }
93 } 102 }
94 103
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs
index caec43d..af5692c 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs
@@ -38,103 +38,111 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
38 private static readonly ILog m_log = 38 private static readonly ILog m_log =
39 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 39 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 40
41 public Hashtable HandleDirectoryRequest(Hashtable request) 41 public Hashtable HandleDirectoryRequest(string Context, string Realm, Hashtable request)
42 { 42 {
43 m_log.DebugFormat("[FreeSwitchDirectory] HandleDirectoryRequest called with {0}",request.ToString()); 43 Hashtable response = new Hashtable();
44 string domain = (string) request["domain"];
45 if ( domain != Realm ) {
46 response["content_type"] = "text/xml";
47 response["keepalive"] = false;
48 response["int_response_code"] = 200;
49 response["str_response_string"] = "";
50 } else {
51 m_log.DebugFormat("[FreeSwitchDirectory] HandleDirectoryRequest called with {0}",request.ToString());
44 52
45 Hashtable response = new Hashtable();
46 53
47 // information in the request we might be interested in 54 // information in the request we might be interested in
48 55
49 // Request 1 sip_auth for users account 56 // Request 1 sip_auth for users account
50 57
51 //Event-Calling-Function=sofia_reg_parse_auth 58 //Event-Calling-Function=sofia_reg_parse_auth
52 //Event-Calling-Line-Number=1494 59 //Event-Calling-Line-Number=1494
53 //action=sip_auth 60 //action=sip_auth
54 //sip_user_agent=Vivox-SDK-2.1.3010.6151-Mac%20(Feb-11-2009/16%3A42%3A41) 61 //sip_user_agent=Vivox-SDK-2.1.3010.6151-Mac%20(Feb-11-2009/16%3A42%3A41)
55 //sip_auth_username=xhZuXKmRpECyr2AARJYyGgg%3D%3D (==) 62 //sip_auth_username=xhZuXKmRpECyr2AARJYyGgg%3D%3D (==)
56 //sip_auth_realm=9.20.151.43 63 //sip_auth_realm=9.20.151.43
57 //sip_contact_user=xhZuXKmRpECyr2AARJYyGgg%3D%3D (==) 64 //sip_contact_user=xhZuXKmRpECyr2AARJYyGgg%3D%3D (==)
58 //sip_contact_host=192.168.0.3 // this shouldnt really be a local IP, investigate STUN servers 65 //sip_contact_host=192.168.0.3 // this shouldnt really be a local IP, investigate STUN servers
59 //sip_to_user=xhZuXKmRpECyr2AARJYyGgg%3D%3D 66 //sip_to_user=xhZuXKmRpECyr2AARJYyGgg%3D%3D
60 //sip_to_host=9.20.151.43 67 //sip_to_host=9.20.151.43
61 //sip_auth_method=REGISTER 68 //sip_auth_method=REGISTER
62 //user=xhZuXKmRpECyr2AARJYyGgg%3D%3D 69 //user=xhZuXKmRpECyr2AARJYyGgg%3D%3D
63 //domain=9.20.151.43 70 //domain=9.20.151.43
64 //ip=9.167.220.137 // this is the correct IP rather than sip_contact_host above when through a vpn or NAT setup 71 //ip=9.167.220.137 // this is the correct IP rather than sip_contact_host above when through a vpn or NAT setup
65 72
66 foreach (DictionaryEntry item in request) 73 foreach (DictionaryEntry item in request)
67 { 74 {
68 m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}", item.Key, item.Value); 75 m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}", item.Key, item.Value);
69 } 76 }
70 77
71 string eventCallingFunction = (string) request["Event-Calling-Function"]; 78 string eventCallingFunction = (string) request["Event-Calling-Function"];
72 if (eventCallingFunction == null) 79 if (eventCallingFunction == null)
73 { 80 {
74 eventCallingFunction = "sofia_reg_parse_auth"; 81 eventCallingFunction = "sofia_reg_parse_auth";
75 } 82 }
76 83
77 if (eventCallingFunction.Length == 0) 84 if (eventCallingFunction.Length == 0)
78 { 85 {
79 eventCallingFunction = "sofia_reg_parse_auth"; 86 eventCallingFunction = "sofia_reg_parse_auth";
80 } 87 }
81 88
82 if (eventCallingFunction == "sofia_reg_parse_auth") 89 if (eventCallingFunction == "sofia_reg_parse_auth")
83 { 90 {
84 string sipAuthMethod = (string)request["sip_auth_method"]; 91 string sipAuthMethod = (string)request["sip_auth_method"];
85 92
86 if (sipAuthMethod == "REGISTER") 93 if (sipAuthMethod == "REGISTER")
87 { 94 {
88 response = HandleRegister(request); 95 response = HandleRegister(Context, Realm, request);
89 } 96 }
90 else if (sipAuthMethod == "INVITE") 97 else if (sipAuthMethod == "INVITE")
91 { 98 {
92 response = HandleInvite(request); 99 response = HandleInvite(Context, Realm, request);
93 } 100 }
94 else 101 else
95 { 102 {
96 m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod); 103 m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod);
97 response["int_response_code"] = 404; 104 response["int_response_code"] = 404;
98 response["content_type"] = "text/xml"; 105 response["content_type"] = "text/xml";
99 response["str_response_string"] = ""; 106 response["str_response_string"] = "";
100 } 107 }
101 } 108 }
102 else if (eventCallingFunction == "switch_xml_locate_user") 109 else if (eventCallingFunction == "switch_xml_locate_user")
103 { 110 {
104 response = HandleLocateUser(request); 111 response = HandleLocateUser(Realm, request);
105 } 112 }
106 else if (eventCallingFunction == "user_data_function") // gets called when an avatar to avatar call is made 113 else if (eventCallingFunction == "user_data_function") // gets called when an avatar to avatar call is made
107 { 114 {
108 response = HandleLocateUser(request); 115 response = HandleLocateUser(Realm, request);
109 } 116 }
110 else if (eventCallingFunction == "user_outgoing_channel") 117 else if (eventCallingFunction == "user_outgoing_channel")
111 { 118 {
112 response = HandleRegister(request); 119 response = HandleRegister(Context, Realm, request);
113 } 120 }
114 else if (eventCallingFunction == "config_sofia") // happens once on freeswitch startup 121 else if (eventCallingFunction == "config_sofia") // happens once on freeswitch startup
115 { 122 {
116 response = HandleConfigSofia(request); 123 response = HandleConfigSofia(Context, Realm, request);
117 } 124 }
118 else if (eventCallingFunction == "switch_load_network_lists") 125 else if (eventCallingFunction == "switch_load_network_lists")
119 { 126 {
120 //response = HandleLoadNetworkLists(request); 127 //response = HandleLoadNetworkLists(request);
121 response["int_response_code"] = 404; 128 response["int_response_code"] = 404;
122 response["keepalive"] = false; 129 response["keepalive"] = false;
123 response["content_type"] = "text/xml"; 130 response["content_type"] = "text/xml";
124 response["str_response_string"] = ""; 131 response["str_response_string"] = "";
125 } 132 }
126 else 133 else
127 { 134 {
128 m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown Event-Calling-Function {0}",eventCallingFunction); 135 m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown Event-Calling-Function {0}",eventCallingFunction);
129 response["int_response_code"] = 404; 136 response["int_response_code"] = 404;
130 response["keepalive"] = false; 137 response["keepalive"] = false;
131 response["content_type"] = "text/xml"; 138 response["content_type"] = "text/xml";
132 response["str_response_string"] = ""; 139 response["str_response_string"] = "";
133 } 140 }
134 return response; 141 }
142 return response;
135 } 143 }
136 144
137 private Hashtable HandleRegister(Hashtable request) 145 private Hashtable HandleRegister(string Context, string Realm, Hashtable request)
138 { 146 {
139 m_log.Info("[FreeSwitchDirectory] HandleRegister called"); 147 m_log.Info("[FreeSwitchDirectory] HandleRegister called");
140 148
@@ -147,7 +155,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
147 response["content_type"] = "text/xml"; 155 response["content_type"] = "text/xml";
148 response["keepalive"] = false; 156 response["keepalive"] = false;
149 response["int_response_code"] = 200; 157 response["int_response_code"] = 200;
150 response["str_response_string"] = String.Format( 158
159 response["str_response_string"] = String.Format(
151 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" + 160 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" +
152 "<document type=\"freeswitch/xml\">\r\n" + 161 "<document type=\"freeswitch/xml\">\r\n" +
153 "<section name=\"directory\" description=\"User Directory\">\r\n" + 162 "<section name=\"directory\" description=\"User Directory\">\r\n" +
@@ -158,19 +167,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
158 "<param name=\"dial-string\" value=\"{{sip_contact_user={1}}}{{presence_id=${{dialed_user}}@${{dialed_domain}}}}${{sofia_contact(${{dialed_user}}@${{dialed_domain}})}}\"/>\r\n" + 167 "<param name=\"dial-string\" value=\"{{sip_contact_user={1}}}{{presence_id=${{dialed_user}}@${{dialed_domain}}}}${{sofia_contact(${{dialed_user}}@${{dialed_domain}})}}\"/>\r\n" +
159 "</params>\r\n" + 168 "</params>\r\n" +
160 "<variables>\r\n" + 169 "<variables>\r\n" +
161 "<variable name=\"user_context\" value=\"default\" />\r\n" + 170 "<variable name=\"user_context\" value=\"{3}\" />\r\n" +
162 "<variable name=\"presence_id\" value=\"{1}@{0}\"/>"+ 171 "<variable name=\"presence_id\" value=\"{1}@{0}\"/>"+
163 "</variables>\r\n" + 172 "</variables>\r\n" +
164 "</user>\r\n" + 173 "</user>\r\n" +
165 "</domain>\r\n" + 174 "</domain>\r\n" +
166 "</section>\r\n" + 175 "</section>\r\n" +
167 "</document>\r\n", 176 "</document>\r\n",
168 domain , user, password); 177 domain , user, password, Context);
169 178
170 return response; 179 return response;
171 } 180 }
172 181
173 private Hashtable HandleInvite(Hashtable request) 182 private Hashtable HandleInvite(string Context, string Realm, Hashtable request)
174 { 183 {
175 m_log.Info("[FreeSwitchDirectory] HandleInvite called"); 184 m_log.Info("[FreeSwitchDirectory] HandleInvite called");
176 185
@@ -195,7 +204,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
195 "<param name=\"dial-string\" value=\"{{sip_contact_user={1}}}{{presence_id=${1}@${{dialed_domain}}}}${{sofia_contact(${1}@${{dialed_domain}})}}\"/>\r\n" + 204 "<param name=\"dial-string\" value=\"{{sip_contact_user={1}}}{{presence_id=${1}@${{dialed_domain}}}}${{sofia_contact(${1}@${{dialed_domain}})}}\"/>\r\n" +
196 "</params>\r\n" + 205 "</params>\r\n" +
197 "<variables>\r\n" + 206 "<variables>\r\n" +
198 "<variable name=\"user_context\" value=\"default\" />\r\n" + 207 "<variable name=\"user_context\" value=\"{4}\" />\r\n" +
199 "<variable name=\"presence_id\" value=\"{1}@$${{domain}}\"/>"+ 208 "<variable name=\"presence_id\" value=\"{1}@$${{domain}}\"/>"+
200 "</variables>\r\n" + 209 "</variables>\r\n" +
201 "</user>\r\n" + 210 "</user>\r\n" +
@@ -205,20 +214,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
205 "<param name=\"dial-string\" value=\"{{sip_contact_user={1}}}{{presence_id=${3}@${{dialed_domain}}}}${{sofia_contact(${3}@${{dialed_domain}})}}\"/>\r\n" + 214 "<param name=\"dial-string\" value=\"{{sip_contact_user={1}}}{{presence_id=${3}@${{dialed_domain}}}}${{sofia_contact(${3}@${{dialed_domain}})}}\"/>\r\n" +
206 "</params>\r\n" + 215 "</params>\r\n" +
207 "<variables>\r\n" + 216 "<variables>\r\n" +
208 "<variable name=\"user_context\" value=\"default\" />\r\n" + 217 "<variable name=\"user_context\" value=\"{4}\" />\r\n" +
209 "<variable name=\"presence_id\" value=\"{3}@$${{domain}}\"/>"+ 218 "<variable name=\"presence_id\" value=\"{3}@$${{domain}}\"/>"+
210 "</variables>\r\n" + 219 "</variables>\r\n" +
211 "</user>\r\n" + 220 "</user>\r\n" +
212 "</domain>\r\n" + 221 "</domain>\r\n" +
213 "</section>\r\n" + 222 "</section>\r\n" +
214 "</document>\r\n", 223 "</document>\r\n",
215 domain , user, password,sipRequestUser); 224 domain , user, password,sipRequestUser, Context);
216 225
217 return response; 226 return response;
218 } 227 }
219 228
220 229
221 private Hashtable HandleLocateUser(Hashtable request) 230 private Hashtable HandleLocateUser(String Realm, Hashtable request)
222 { 231 {
223 m_log.Info("[FreeSwitchDirectory] HandleLocateUser called"); 232 m_log.Info("[FreeSwitchDirectory] HandleLocateUser called");
224 233
@@ -252,7 +261,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
252 return response; 261 return response;
253 } 262 }
254 263
255 private Hashtable HandleConfigSofia(Hashtable request) 264 private Hashtable HandleConfigSofia(string Context, string Realm, Hashtable request)
256 { 265 {
257 m_log.Info("[FreeSwitchDirectory] HandleConfigSofia called"); 266 m_log.Info("[FreeSwitchDirectory] HandleConfigSofia called");
258 267
@@ -285,7 +294,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
285 "<param name=\"retry-seconds\" value=\"30\"/>\r\n"+ 294 "<param name=\"retry-seconds\" value=\"30\"/>\r\n"+
286 "<param name=\"extension\" value=\"$${{default_provider_contact}}\"/>\r\n"+ 295 "<param name=\"extension\" value=\"$${{default_provider_contact}}\"/>\r\n"+
287 "<param name=\"contact-params\" value=\"domain_name=$${{domain}}\"/>\r\n"+ 296 "<param name=\"contact-params\" value=\"domain_name=$${{domain}}\"/>\r\n"+
288 "<param name=\"context\" value=\"public\"/>\r\n"+ 297 "<param name=\"context\" value=\"{1}\"/>\r\n"+
289 "</gateway>\r\n"+ 298 "</gateway>\r\n"+
290 "</gateways>\r\n"+ 299 "</gateways>\r\n"+
291 "<params>\r\n"+ 300 "<params>\r\n"+
@@ -300,7 +309,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
300 "</domain>\r\n" + 309 "</domain>\r\n" +
301 "</section>\r\n" + 310 "</section>\r\n" +
302 "</document>\r\n", 311 "</document>\r\n",
303 domain); 312 domain, Context);
304 313
305 return response; 314 return response;
306 } 315 }
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
index 5c562ac..3659299 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
@@ -95,6 +95,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
95 // private static IPEndPoint m_FreeSwitchServiceIP; 95 // private static IPEndPoint m_FreeSwitchServiceIP;
96 private int m_freeSwitchServicePort; 96 private int m_freeSwitchServicePort;
97 private string m_openSimWellKnownHTTPAddress; 97 private string m_openSimWellKnownHTTPAddress;
98 private string m_freeSwitchContext;
98 99
99 private FreeSwitchDirectory m_FreeSwitchDirectory; 100 private FreeSwitchDirectory m_FreeSwitchDirectory;
100 private FreeSwitchDialplan m_FreeSwitchDialplan; 101 private FreeSwitchDialplan m_FreeSwitchDialplan;
@@ -151,6 +152,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
151 m_freeSwitchDefaultTimeout = m_config.GetInt("freeswitch_default_timeout", 5000); 152 m_freeSwitchDefaultTimeout = m_config.GetInt("freeswitch_default_timeout", 5000);
152 // m_freeSwitchSubscribeRetry = m_config.GetInt("freeswitch_subscribe_retry", 120); 153 // m_freeSwitchSubscribeRetry = m_config.GetInt("freeswitch_subscribe_retry", 120);
153 m_freeSwitchUrlResetPassword = m_config.GetString("freeswitch_password_reset_url", String.Empty); 154 m_freeSwitchUrlResetPassword = m_config.GetString("freeswitch_password_reset_url", String.Empty);
155 m_freeSwitchContext = m_config.GetString("freeswitch_context", "public");
154 156
155 if (String.IsNullOrEmpty(m_freeSwitchServerUser) || 157 if (String.IsNullOrEmpty(m_freeSwitchServerUser) ||
156 String.IsNullOrEmpty(m_freeSwitchServerPass) || 158 String.IsNullOrEmpty(m_freeSwitchServerPass) ||
@@ -572,7 +574,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
572 "<App.NoBottomLogo>false</App.NoBottomLogo>\r\n"+ 574 "<App.NoBottomLogo>false</App.NoBottomLogo>\r\n"+
573 "</VCConfiguration>", 575 "</VCConfiguration>",
574 m_freeSwitchRealm, m_freeSwitchSIPProxy, m_freeSwitchAttemptUseSTUN, 576 m_freeSwitchRealm, m_freeSwitchSIPProxy, m_freeSwitchAttemptUseSTUN,
575 m_freeSwitchSTUNServer, m_freeSwitchEchoServer, m_freeSwitchEchoPort, 577 m_freeSwitchEchoServer, m_freeSwitchEchoPort,
576 m_freeSwitchDefaultWellKnownIP, m_freeSwitchDefaultTimeout, 578 m_freeSwitchDefaultWellKnownIP, m_freeSwitchDefaultTimeout,
577 m_freeSwitchUrlResetPassword, ""); 579 m_freeSwitchUrlResetPassword, "");
578 580
@@ -728,9 +730,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
728 string section = (string) requestBody["section"]; 730 string section = (string) requestBody["section"];
729 731
730 if (section == "directory") 732 if (section == "directory")
731 response = m_FreeSwitchDirectory.HandleDirectoryRequest(requestBody); 733 response = m_FreeSwitchDirectory.HandleDirectoryRequest(m_freeSwitchContext, m_freeSwitchRealm, requestBody);
732 else if (section == "dialplan") 734 else if (section == "dialplan")
733 response = m_FreeSwitchDialplan.HandleDialplanRequest(requestBody); 735 response = m_FreeSwitchDialplan.HandleDialplanRequest(m_freeSwitchContext, m_freeSwitchRealm, requestBody);
734 else 736 else
735 m_log.WarnFormat("[FreeSwitchVoice]: section was {0}", section); 737 m_log.WarnFormat("[FreeSwitchVoice]: section was {0}", section);
736 738