diff options
author | Melanie | 2009-08-04 05:03:32 +0100 |
---|---|---|
committer | Melanie | 2009-08-04 05:03:32 +0100 |
commit | c3dd98b016c8770c61525bd4d6ca898c635358ed (patch) | |
tree | 72fe8e99c401770a880d022126a1b7228c35217d /OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs | |
parent | Update a misspelled name (diff) | |
download | opensim-SC-c3dd98b016c8770c61525bd4d6ca898c635358ed.zip opensim-SC-c3dd98b016c8770c61525bd4d6ca898c635358ed.tar.gz opensim-SC-c3dd98b016c8770c61525bd4d6ca898c635358ed.tar.bz2 opensim-SC-c3dd98b016c8770c61525bd4d6ca898c635358ed.tar.xz |
Revert the #3899 patch and it's two follow ups
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs | 25 |
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 | ||
28 | using log4net; | 28 | using log4net; |
29 | using System; | ||
30 | using System.Reflection; | 29 | using System.Reflection; |
31 | using System.Text; | ||
32 | using System.Collections; | 30 | using System.Collections; |
33 | 31 | ||
34 | namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | 32 | namespace 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 | } |