aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs
diff options
context:
space:
mode:
authorMelanie2009-08-04 05:03:32 +0100
committerMelanie2009-08-04 05:03:32 +0100
commitc3dd98b016c8770c61525bd4d6ca898c635358ed (patch)
tree72fe8e99c401770a880d022126a1b7228c35217d /OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs
parentUpdate a misspelled name (diff)
downloadopensim-SC_OLD-c3dd98b016c8770c61525bd4d6ca898c635358ed.zip
opensim-SC_OLD-c3dd98b016c8770c61525bd4d6ca898c635358ed.tar.gz
opensim-SC_OLD-c3dd98b016c8770c61525bd4d6ca898c635358ed.tar.bz2
opensim-SC_OLD-c3dd98b016c8770c61525bd4d6ca898c635358ed.tar.xz
Revert the #3899 patch and it's two follow ups
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs25
1 files changed, 8 insertions, 17 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs
index 94f29ea..c05d598 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs
@@ -26,9 +26,7 @@
26 */ 26 */
27 27
28using log4net; 28using log4net;
29using System;
30using System.Reflection; 29using System.Reflection;
31using System.Text;
32using System.Collections; 30using System.Collections;
33 31
34namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice 32namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
@@ -39,7 +37,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
39 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 37 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 38
41 39
42 public Hashtable HandleDialplanRequest(string Context, string Realm, Hashtable request) 40 public Hashtable HandleDialplanRequest(Hashtable request)
43 { 41 {
44 m_log.DebugFormat("[FreeSwitchVoice] HandleDialplanRequest called with {0}",request.ToString()); 42 m_log.DebugFormat("[FreeSwitchVoice] HandleDialplanRequest called with {0}",request.ToString());
45 43
@@ -50,32 +48,26 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
50 m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}",item.Key, item.Value); 48 m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}",item.Key, item.Value);
51 } 49 }
52 50
53 string requestcontext = (string) request["Hunt-Context"];
54 response["content_type"] = "text/xml"; 51 response["content_type"] = "text/xml";
55 response["keepalive"] = false; 52 response["keepalive"] = false;
56 response["int_response_code"] = 200; 53 response["int_response_code"] = 200;
57 if (Context != requestcontext && Context != "public") 54 response["str_response_string"] = @"<?xml version=""1.0"" encoding=""utf-8""?>
58 {
59 m_log.DebugFormat("[FreeSwitchDirectory] returning empty as it's for context {0} and we are using {1}", requestcontext, Context);
60 response["str_response_string"] = "";
61 } else {
62 response["str_response_string"] = String.Format(@"<?xml version=""1.0"" encoding=""utf-8""?>
63 <document type=""freeswitch/xml""> 55 <document type=""freeswitch/xml"">
64 <section name=""dialplan""> 56 <section name=""dialplan"">
65 <context name=""{0}"">" + 57 <context name=""default"">
66 58
67/* <!-- dial via SIP uri --> 59 <!-- dial via SIP uri -->
68 <extension name=""sip_uri""> 60 <extension name=""sip_uri"">
69 <condition field=""destination_number"" expression=""^sip:(.*)$""> 61 <condition field=""destination_number"" expression=""^sip:(.*)$"">
70 <action application=""bridge"" data=""sofia/${use_profile}/$1""/> 62 <action application=""bridge"" data=""sofia/${use_profile}/$1""/>
71 <!--<action application=""bridge"" data=""$1""/>--> 63 <!--<action application=""bridge"" data=""$1""/>-->
72 </condition> 64 </condition>
73 </extension>*/ 65 </extension>
74 66
75 @"<extension name=""opensim_conferences""> 67 <extension name=""opensim_conferences"">
76 <condition field=""destination_number"" expression=""^confctl-(.*)$""> 68 <condition field=""destination_number"" expression=""^confctl-(.*)$"">
77 <action application=""answer""/> 69 <action application=""answer""/>
78 <action application=""conference"" data=""$1-{1}@grid""/> 70 <action application=""conference"" data=""$1-${domain_name}@default""/>
79 </condition> 71 </condition>
80 </extension> 72 </extension>
81 73
@@ -94,8 +86,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
94 86
95 </context> 87 </context>
96 </section> 88 </section>
97 </document>", Context, Realm); 89 </document>";
98 }
99 90
100 return response; 91 return response;
101 } 92 }