diff options
author | Jeff Ames | 2009-04-22 00:48:56 +0000 |
---|---|---|
committer | Jeff Ames | 2009-04-22 00:48:56 +0000 |
commit | 6aa5d3904d71c4be21e5991d9ba82dff3c1cf51f (patch) | |
tree | 55509d75eca81eb3b463984a1981c3a4d4fcce54 /OpenSim/Region/OptionalModules/Avatar/Voice | |
parent | Thank you kindly, MCortez, for a patch that: (diff) | |
download | opensim-SC_OLD-6aa5d3904d71c4be21e5991d9ba82dff3c1cf51f.zip opensim-SC_OLD-6aa5d3904d71c4be21e5991d9ba82dff3c1cf51f.tar.gz opensim-SC_OLD-6aa5d3904d71c4be21e5991d9ba82dff3c1cf51f.tar.bz2 opensim-SC_OLD-6aa5d3904d71c4be21e5991d9ba82dff3c1cf51f.tar.xz |
Add copyright headers. Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Voice')
3 files changed, 73 insertions, 73 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs index 2a2b4a3..d8fce67 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
43 | 43 | ||
44 | Hashtable response = new Hashtable(); | 44 | Hashtable response = new Hashtable(); |
45 | 45 | ||
46 | foreach(DictionaryEntry item in request) | 46 | foreach (DictionaryEntry item in request) |
47 | { | 47 | { |
48 | 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); |
49 | } | 49 | } |
@@ -52,37 +52,37 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
52 | response["keepalive"] = false; | 52 | response["keepalive"] = false; |
53 | response["int_response_code"]=200; | 53 | response["int_response_code"]=200; |
54 | response["str_response_string"] = @"<?xml version=""1.0"" encoding=""utf-8""?> | 54 | response["str_response_string"] = @"<?xml version=""1.0"" encoding=""utf-8""?> |
55 | <document type=""freeswitch/xml""> | 55 | <document type=""freeswitch/xml""> |
56 | <section name=""dialplan""> | 56 | <section name=""dialplan""> |
57 | <context name=""default""> | 57 | <context name=""default""> |
58 | 58 | ||
59 | <!-- dial via SIP uri --> | 59 | <!-- dial via SIP uri --> |
60 | <extension name=""sip_uri""> | 60 | <extension name=""sip_uri""> |
61 | <condition field=""destination_number"" expression=""^sip:(.*)$""> | 61 | <condition field=""destination_number"" expression=""^sip:(.*)$""> |
62 | <action application=""bridge"" data=""sofia/${use_profile}/$1""/> | 62 | <action application=""bridge"" data=""sofia/${use_profile}/$1""/> |
63 | <!--<action application=""bridge"" data=""$1""/>--> | 63 | <!--<action application=""bridge"" data=""$1""/>--> |
64 | </condition> | 64 | </condition> |
65 | </extension> | 65 | </extension> |
66 | 66 | ||
67 | <extension name=""opensim_conferences""> | 67 | <extension name=""opensim_conferences""> |
68 | <condition field=""destination_number"" expression=""^confctl-(.*)$""> | 68 | <condition field=""destination_number"" expression=""^confctl-(.*)$""> |
69 | <action application=""answer""/> | 69 | <action application=""answer""/> |
70 | <action application=""conference"" data=""$1-${domain_name}@default""/> | 70 | <action application=""conference"" data=""$1-${domain_name}@default""/> |
71 | </condition> | 71 | </condition> |
72 | </extension> | 72 | </extension> |
73 | 73 | ||
74 | <extension name=""avatar""> | 74 | <extension name=""avatar""> |
75 | <condition field=""destination_number"" expression=""^(x.*)$""> | 75 | <condition field=""destination_number"" expression=""^(x.*)$""> |
76 | <action application=""bridge"" data=""user/$1""/> | 76 | <action application=""bridge"" data=""user/$1""/> |
77 | </condition> | 77 | </condition> |
78 | </extension> | 78 | </extension> |
79 | 79 | ||
80 | </context> | 80 | </context> |
81 | </section> | 81 | </section> |
82 | </document>"; | 82 | </document>"; |
83 | 83 | ||
84 | return response; | 84 | return response; |
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||
88 | } \ No newline at end of file | 88 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs index 9959d11..4113976 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
63 | //domain=9.20.151.43 | 63 | //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 | 64 | //ip=9.167.220.137 // this is the correct IP rather than sip_contact_host above when through a vpn or NAT setup |
65 | 65 | ||
66 | foreach(DictionaryEntry item in request) | 66 | foreach (DictionaryEntry item in request) |
67 | { | 67 | { |
68 | m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}",item.Key, item.Value); | 68 | m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}",item.Key, item.Value); |
69 | } | 69 | } |
@@ -71,41 +71,41 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
71 | string eventCallingFunction = (string) request["Event-Calling-Function"]; | 71 | string eventCallingFunction = (string) request["Event-Calling-Function"]; |
72 | 72 | ||
73 | 73 | ||
74 | if(eventCallingFunction=="sofia_reg_parse_auth") | 74 | if (eventCallingFunction=="sofia_reg_parse_auth") |
75 | { | 75 | { |
76 | string sipAuthMethod = (string)request["sip_auth_method"]; | 76 | string sipAuthMethod = (string)request["sip_auth_method"]; |
77 | 77 | ||
78 | if(sipAuthMethod=="REGISTER") | 78 | if (sipAuthMethod=="REGISTER") |
79 | { | 79 | { |
80 | response = HandleRegister(request); | 80 | response = HandleRegister(request); |
81 | } | 81 | } |
82 | else if(sipAuthMethod=="INVITE") | 82 | else if (sipAuthMethod=="INVITE") |
83 | { | 83 | { |
84 | response = HandleInvite(request); | 84 | response = HandleInvite(request); |
85 | } | 85 | } |
86 | else | 86 | else |
87 | { | 87 | { |
88 | m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod); | 88 | m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod); |
89 | response["int_response_code"]=404; | 89 | response["int_response_code"]=404; |
90 | } | 90 | } |
91 | } | 91 | } |
92 | else if(eventCallingFunction=="switch_xml_locate_user") | 92 | else if (eventCallingFunction=="switch_xml_locate_user") |
93 | { | 93 | { |
94 | response = HandleLocateUser(request); | 94 | response = HandleLocateUser(request); |
95 | } | 95 | } |
96 | else if(eventCallingFunction=="user_data_function") // gets called when an avatar to avatar call is made | 96 | else if (eventCallingFunction=="user_data_function") // gets called when an avatar to avatar call is made |
97 | { | 97 | { |
98 | response = HandleLocateUser(request); | 98 | response = HandleLocateUser(request); |
99 | } | 99 | } |
100 | else if(eventCallingFunction=="user_outgoing_channel") | 100 | else if (eventCallingFunction=="user_outgoing_channel") |
101 | { | 101 | { |
102 | response = HandleRegister(request); | 102 | response = HandleRegister(request); |
103 | } | 103 | } |
104 | else if(eventCallingFunction=="config_sofia") // happens once on freeswitch startup | 104 | else if (eventCallingFunction=="config_sofia") // happens once on freeswitch startup |
105 | { | 105 | { |
106 | response = HandleConfigSofia(request); | 106 | response = HandleConfigSofia(request); |
107 | } | 107 | } |
108 | else if(eventCallingFunction=="switch_load_network_lists") | 108 | else if (eventCallingFunction=="switch_load_network_lists") |
109 | { | 109 | { |
110 | //response = HandleLoadNetworkLists(request); | 110 | //response = HandleLoadNetworkLists(request); |
111 | response["int_response_code"]=404; | 111 | response["int_response_code"]=404; |
@@ -266,24 +266,24 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
266 | "<groups name=\"default\">\r\n"+ | 266 | "<groups name=\"default\">\r\n"+ |
267 | "<users>\r\n"+ | 267 | "<users>\r\n"+ |
268 | "<user id=\"$${{default_provider}}\">\r\n"+ | 268 | "<user id=\"$${{default_provider}}\">\r\n"+ |
269 | "<gateways>\r\n"+ | 269 | "<gateways>\r\n"+ |
270 | "<gateway name=\"$${{default_provider}}\">\r\n"+ | 270 | "<gateway name=\"$${{default_provider}}\">\r\n"+ |
271 | "<param name=\"username\" value=\"$${{default_provider_username}}\"/>\r\n"+ | 271 | "<param name=\"username\" value=\"$${{default_provider_username}}\"/>\r\n"+ |
272 | "<param name=\"password\" value=\"$${{default_provider_password}}\"/>\r\n"+ | 272 | "<param name=\"password\" value=\"$${{default_provider_password}}\"/>\r\n"+ |
273 | "<param name=\"from-user\" value=\"$${{default_provider_username}}\"/>\r\n"+ | 273 | "<param name=\"from-user\" value=\"$${{default_provider_username}}\"/>\r\n"+ |
274 | "<param name=\"from-domain\" value=\"$${{default_provider_from_domain}}\"/>\r\n"+ | 274 | "<param name=\"from-domain\" value=\"$${{default_provider_from_domain}}\"/>\r\n"+ |
275 | "<param name=\"expire-seconds\" value=\"600\"/>\r\n"+ | 275 | "<param name=\"expire-seconds\" value=\"600\"/>\r\n"+ |
276 | "<param name=\"register\" value=\"$${{default_provider_register}}\"/>\r\n"+ | 276 | "<param name=\"register\" value=\"$${{default_provider_register}}\"/>\r\n"+ |
277 | "<param name=\"retry-seconds\" value=\"30\"/>\r\n"+ | 277 | "<param name=\"retry-seconds\" value=\"30\"/>\r\n"+ |
278 | "<param name=\"extension\" value=\"$${{default_provider_contact}}\"/>\r\n"+ | 278 | "<param name=\"extension\" value=\"$${{default_provider_contact}}\"/>\r\n"+ |
279 | "<param name=\"contact-params\" value=\"domain_name=$${{domain}}\"/>\r\n"+ | 279 | "<param name=\"contact-params\" value=\"domain_name=$${{domain}}\"/>\r\n"+ |
280 | "<param name=\"context\" value=\"public\"/>\r\n"+ | 280 | "<param name=\"context\" value=\"public\"/>\r\n"+ |
281 | "</gateway>\r\n"+ | 281 | "</gateway>\r\n"+ |
282 | "</gateways>\r\n"+ | 282 | "</gateways>\r\n"+ |
283 | "<params>\r\n"+ | 283 | "<params>\r\n"+ |
284 | "<param name=\"password\" value=\"$${{default_provider_password}}\"/>\r\n"+ | 284 | "<param name=\"password\" value=\"$${{default_provider_password}}\"/>\r\n"+ |
285 | "</params>\r\n"+ | 285 | "</params>\r\n"+ |
286 | "</user>\r\n"+ | 286 | "</user>\r\n"+ |
287 | "</users>"+ | 287 | "</users>"+ |
288 | "</groups>\r\n" + | 288 | "</groups>\r\n" + |
289 | "<variables>\r\n"+ | 289 | "<variables>\r\n"+ |
@@ -332,4 +332,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
332 | 332 | ||
333 | } | 333 | } |
334 | 334 | ||
335 | } \ No newline at end of file | 335 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index a8f9de6..fcb1c97 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -500,7 +500,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
500 | // is this a dialplan or directory request | 500 | // is this a dialplan or directory request |
501 | string section = (string) requestBody["section"]; | 501 | string section = (string) requestBody["section"]; |
502 | 502 | ||
503 | if(section=="directory") | 503 | if (section=="directory") |
504 | response = m_FreeSwitchDirectory.HandleDirectoryRequest(requestBody); | 504 | response = m_FreeSwitchDirectory.HandleDirectoryRequest(requestBody); |
505 | else if (section=="dialplan") | 505 | else if (section=="dialplan") |
506 | response = m_FreeSwitchDialplan.HandleDialplanRequest(requestBody); | 506 | response = m_FreeSwitchDialplan.HandleDialplanRequest(requestBody); |