Formatting cleanup.
							parent
							
								
									b73edc3d7a
								
							
						
					
					
						commit
						a133e83f3a
					
				| 
						 | 
				
			
			@ -129,7 +129,7 @@ namespace OpenSim.Framework
 | 
			
		|||
 | 
			
		||||
    public delegate void UpdatePrimSingleRotation(uint localID, Quaternion rot, IClientAPI remoteClient);
 | 
			
		||||
 | 
			
		||||
    public delegate void UpdatePrimSingleRotationPosition( uint localID, Quaternion rot, Vector3 pos,  IClientAPI remoteClient);
 | 
			
		||||
    public delegate void UpdatePrimSingleRotationPosition(uint localID, Quaternion rot, Vector3 pos, IClientAPI remoteClient);
 | 
			
		||||
 | 
			
		||||
    public delegate void UpdatePrimGroupRotation(uint localID, Vector3 pos, Quaternion rot, IClientAPI remoteClient);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -140,7 +140,6 @@ namespace OpenSim.Framework
 | 
			
		|||
                                              bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters,
 | 
			
		||||
                                              bool CopyRotates);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public delegate void StatusChange(bool status);
 | 
			
		||||
 | 
			
		||||
    public delegate void NewAvatar(IClientAPI remoteClient, UUID agentID, bool status);
 | 
			
		||||
| 
						 | 
				
			
			@ -151,8 +150,7 @@ namespace OpenSim.Framework
 | 
			
		|||
 | 
			
		||||
    public delegate void AgentSit(IClientAPI remoteClient, UUID agentID);
 | 
			
		||||
 | 
			
		||||
    public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery
 | 
			
		||||
        );
 | 
			
		||||
    public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery);
 | 
			
		||||
 | 
			
		||||
    public delegate void GrabObject(
 | 
			
		||||
        uint localID, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
 | 
			
		||||
| 
						 | 
				
			
			@ -161,8 +159,7 @@ namespace OpenSim.Framework
 | 
			
		|||
        uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
 | 
			
		||||
 | 
			
		||||
    public delegate void MoveObject(
 | 
			
		||||
        UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs
 | 
			
		||||
        );
 | 
			
		||||
        UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
 | 
			
		||||
 | 
			
		||||
    public delegate void SpinStart(UUID objectID, IClientAPI remoteClient);
 | 
			
		||||
    public delegate void SpinObject(UUID objectID, Quaternion rotation, IClientAPI remoteClient);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -240,12 +240,12 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
 | 
			
		|||
 | 
			
		||||
        private Hashtable HttpRequestHandler(Hashtable request)
 | 
			
		||||
        {
 | 
			
		||||
		   	string uri = request["uri"].ToString();
 | 
			
		||||
		   	//A solution to this ugly mess would be to use only the /lslhttp/<UUID>/ part of the URI as the key.
 | 
			
		||||
		    UrlData url = m_UrlMap["http://"+System.Environment.MachineName+":"+m_HttpServer.Port.ToString()+uri]; 
 | 
			
		||||
		    
 | 
			
		||||
		    //UUID.Random() below is a hack! Eventually we will do HTTP requests and responses properly.
 | 
			
		||||
		    url.engine.PostScriptEvent(url.itemID, "http_request", new Object[] { UUID.Random().ToString(), request["http-method"].ToString(), request["body"].ToString() });
 | 
			
		||||
            string uri = request["uri"].ToString();
 | 
			
		||||
            //A solution to this ugly mess would be to use only the /lslhttp/<UUID>/ part of the URI as the key.
 | 
			
		||||
            UrlData url = m_UrlMap["http://"+System.Environment.MachineName+":"+m_HttpServer.Port.ToString()+uri]; 
 | 
			
		||||
            
 | 
			
		||||
            //UUID.Random() below is a hack! Eventually we will do HTTP requests and responses properly.
 | 
			
		||||
            url.engine.PostScriptEvent(url.itemID, "http_request", new Object[] { UUID.Random().ToString(), request["http-method"].ToString(), request["body"].ToString() });
 | 
			
		||||
 | 
			
		||||
            Hashtable response = new Hashtable();
 | 
			
		||||
            response["int_response_code"] = 200;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,7 +36,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
 | 
			
		|||
    public class FreeSwitchDialplan 
 | 
			
		||||
    {
 | 
			
		||||
        private static readonly ILog m_log = 
 | 
			
		||||
			LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
 | 
			
		||||
            LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
 | 
			
		||||
            
 | 
			
		||||
         
 | 
			
		||||
        public Hashtable HandleDialplanRequest(string Context, string Realm, Hashtable request)
 | 
			
		||||
| 
						 | 
				
			
			@ -54,50 +54,50 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
 | 
			
		|||
             response["content_type"] = "text/xml";
 | 
			
		||||
             response["keepalive"] = false;
 | 
			
		||||
             response["int_response_code"] = 200;
 | 
			
		||||
			if ( Context != requestcontext )
 | 
			
		||||
			{
 | 
			
		||||
				m_log.Debug("[FreeSwitchDirectory] returning empty as it's for another context");
 | 
			
		||||
				response["str_response_string"] = "";
 | 
			
		||||
			} else {
 | 
			
		||||
            	response["str_response_string"] = String.Format(@"<?xml version=""1.0"" encoding=""utf-8""?>
 | 
			
		||||
	               <document type=""freeswitch/xml"">
 | 
			
		||||
	                 <section name=""dialplan"">
 | 
			
		||||
	                 <context name=""{0}"">" + 
 | 
			
		||||
            if (Context != requestcontext)
 | 
			
		||||
            {
 | 
			
		||||
                m_log.Debug("[FreeSwitchDirectory] returning empty as it's for another context");
 | 
			
		||||
                response["str_response_string"] = "";
 | 
			
		||||
            } else {
 | 
			
		||||
                response["str_response_string"] = String.Format(@"<?xml version=""1.0"" encoding=""utf-8""?>
 | 
			
		||||
                   <document type=""freeswitch/xml"">
 | 
			
		||||
                     <section name=""dialplan"">
 | 
			
		||||
                     <context name=""{0}"">" + 
 | 
			
		||||
               
 | 
			
		||||
/*	                       <!-- dial via SIP uri -->
 | 
			
		||||
	                        <extension name=""sip_uri"">
 | 
			
		||||
	                               <condition field=""destination_number"" expression=""^sip:(.*)$"">
 | 
			
		||||
	                               <action application=""bridge"" data=""sofia/${use_profile}/$1""/>
 | 
			
		||||
	                               <!--<action application=""bridge"" data=""$1""/>-->
 | 
			
		||||
	                               </condition>
 | 
			
		||||
	                       </extension>*/
 | 
			
		||||
/*                           <!-- dial via SIP uri -->
 | 
			
		||||
                            <extension name=""sip_uri"">
 | 
			
		||||
                                   <condition field=""destination_number"" expression=""^sip:(.*)$"">
 | 
			
		||||
                                   <action application=""bridge"" data=""sofia/${use_profile}/$1""/>
 | 
			
		||||
                                   <!--<action application=""bridge"" data=""$1""/>-->
 | 
			
		||||
                                   </condition>
 | 
			
		||||
                           </extension>*/
 | 
			
		||||
               
 | 
			
		||||
	                       @"<extension name=""opensim_conferences"">
 | 
			
		||||
	                               <condition field=""destination_number"" expression=""^confctl-(.*)$"">
 | 
			
		||||
	                                       <action application=""answer""/>
 | 
			
		||||
	                                       <action application=""conference"" data=""$1-{1}@grid""/>
 | 
			
		||||
	                               </condition>
 | 
			
		||||
	                       </extension>
 | 
			
		||||
                           @"<extension name=""opensim_conferences"">
 | 
			
		||||
                                   <condition field=""destination_number"" expression=""^confctl-(.*)$"">
 | 
			
		||||
                                           <action application=""answer""/>
 | 
			
		||||
                                           <action application=""conference"" data=""$1-{1}@grid""/>
 | 
			
		||||
                                   </condition>
 | 
			
		||||
                           </extension>
 | 
			
		||||
                       
 | 
			
		||||
	                       <extension name=""opensim_conf"">
 | 
			
		||||
	                               <condition field=""destination_number"" expression=""^conf-(.*)$"">
 | 
			
		||||
	                                       <action application=""answer""/>
 | 
			
		||||
	                                       <action application=""conference"" data=""$1-${domain_name}@default""/>
 | 
			
		||||
	                               </condition>
 | 
			
		||||
	                       </extension>
 | 
			
		||||
                           <extension name=""opensim_conf"">
 | 
			
		||||
                                   <condition field=""destination_number"" expression=""^conf-(.*)$"">
 | 
			
		||||
                                           <action application=""answer""/>
 | 
			
		||||
                                           <action application=""conference"" data=""$1-${domain_name}@default""/>
 | 
			
		||||
                                   </condition>
 | 
			
		||||
                           </extension>
 | 
			
		||||
               
 | 
			
		||||
	                       <extension name=""avatar"">
 | 
			
		||||
	                               <condition field=""destination_number"" expression=""^(x.*)$"">
 | 
			
		||||
	                                       <action application=""bridge"" data=""user/$1""/>
 | 
			
		||||
	                               </condition>
 | 
			
		||||
	                       </extension>
 | 
			
		||||
                           <extension name=""avatar"">
 | 
			
		||||
                                   <condition field=""destination_number"" expression=""^(x.*)$"">
 | 
			
		||||
                                           <action application=""bridge"" data=""user/$1""/>
 | 
			
		||||
                                   </condition>
 | 
			
		||||
                           </extension>
 | 
			
		||||
               
 | 
			
		||||
	                 </context>
 | 
			
		||||
	               </section>
 | 
			
		||||
	               </document>", Context, Realm);
 | 
			
		||||
			}
 | 
			
		||||
                     </context>
 | 
			
		||||
                   </section>
 | 
			
		||||
                   </document>", Context, Realm);
 | 
			
		||||
            }
 | 
			
		||||
             
 | 
			
		||||
			return response;   
 | 
			
		||||
            return response;   
 | 
			
		||||
        }    
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,109 +40,108 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
 | 
			
		|||
            
 | 
			
		||||
        public Hashtable HandleDirectoryRequest(string Context, string Realm, Hashtable request)
 | 
			
		||||
        {
 | 
			
		||||
			Hashtable response = new Hashtable();
 | 
			
		||||
        	string domain = (string) request["domain"];
 | 
			
		||||
			if ( domain != Realm ) {
 | 
			
		||||
				response["content_type"] = "text/xml";
 | 
			
		||||
				response["keepalive"] = false;
 | 
			
		||||
				response["int_response_code"] = 200;
 | 
			
		||||
				response["str_response_string"] = "";
 | 
			
		||||
			} else {
 | 
			
		||||
	             m_log.DebugFormat("[FreeSwitchDirectory] HandleDirectoryRequest called with {0}",request.ToString());
 | 
			
		||||
            Hashtable response = new Hashtable();
 | 
			
		||||
            string domain = (string) request["domain"];
 | 
			
		||||
            if (domain != Realm) {
 | 
			
		||||
                response["content_type"] = "text/xml";
 | 
			
		||||
                response["keepalive"] = false;
 | 
			
		||||
                response["int_response_code"] = 200;
 | 
			
		||||
                response["str_response_string"] = "";
 | 
			
		||||
            } else {
 | 
			
		||||
                 m_log.DebugFormat("[FreeSwitchDirectory] HandleDirectoryRequest called with {0}",request.ToString());
 | 
			
		||||
            
 | 
			
		||||
                 // information in the request we might be interested in
 | 
			
		||||
             
 | 
			
		||||
                 // Request 1 sip_auth for users account
 | 
			
		||||
             
 | 
			
		||||
	             // information in the request we might be interested in
 | 
			
		||||
                 //Event-Calling-Function=sofia_reg_parse_auth
 | 
			
		||||
                 //Event-Calling-Line-Number=1494
 | 
			
		||||
                 //action=sip_auth
 | 
			
		||||
                 //sip_user_agent=Vivox-SDK-2.1.3010.6151-Mac%20(Feb-11-2009/16%3A42%3A41)
 | 
			
		||||
                 //sip_auth_username=xhZuXKmRpECyr2AARJYyGgg%3D%3D  (==)
 | 
			
		||||
                 //sip_auth_realm=9.20.151.43
 | 
			
		||||
                 //sip_contact_user=xhZuXKmRpECyr2AARJYyGgg%3D%3D (==)
 | 
			
		||||
                 //sip_contact_host=192.168.0.3    // this shouldnt really be a local IP, investigate STUN servers
 | 
			
		||||
                 //sip_to_user=xhZuXKmRpECyr2AARJYyGgg%3D%3D
 | 
			
		||||
                 //sip_to_host=9.20.151.43
 | 
			
		||||
                 //sip_auth_method=REGISTER
 | 
			
		||||
                 //user=xhZuXKmRpECyr2AARJYyGgg%3D%3D
 | 
			
		||||
                 //domain=9.20.151.43
 | 
			
		||||
                 //ip=9.167.220.137    // this is the correct IP rather than sip_contact_host above when through a vpn or NAT setup
 | 
			
		||||
             
 | 
			
		||||
	             // Request 1 sip_auth for users account
 | 
			
		||||
                 foreach (DictionaryEntry item in request)
 | 
			
		||||
                 {
 | 
			
		||||
                    m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}", item.Key, item.Value);
 | 
			
		||||
                 }
 | 
			
		||||
             
 | 
			
		||||
	             //Event-Calling-Function=sofia_reg_parse_auth
 | 
			
		||||
	             //Event-Calling-Line-Number=1494
 | 
			
		||||
	             //action=sip_auth
 | 
			
		||||
	             //sip_user_agent=Vivox-SDK-2.1.3010.6151-Mac%20(Feb-11-2009/16%3A42%3A41)
 | 
			
		||||
	             //sip_auth_username=xhZuXKmRpECyr2AARJYyGgg%3D%3D  (==)
 | 
			
		||||
	             //sip_auth_realm=9.20.151.43
 | 
			
		||||
	             //sip_contact_user=xhZuXKmRpECyr2AARJYyGgg%3D%3D (==)
 | 
			
		||||
	             //sip_contact_host=192.168.0.3    // this shouldnt really be a local IP, investigate STUN servers
 | 
			
		||||
	             //sip_to_user=xhZuXKmRpECyr2AARJYyGgg%3D%3D
 | 
			
		||||
	             //sip_to_host=9.20.151.43
 | 
			
		||||
	             //sip_auth_method=REGISTER
 | 
			
		||||
	             //user=xhZuXKmRpECyr2AARJYyGgg%3D%3D
 | 
			
		||||
	             //domain=9.20.151.43
 | 
			
		||||
	             //ip=9.167.220.137    // this is the correct IP rather than sip_contact_host above when through a vpn or NAT setup
 | 
			
		||||
             
 | 
			
		||||
	             foreach (DictionaryEntry item in request)
 | 
			
		||||
	             {
 | 
			
		||||
	                m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}", item.Key, item.Value);
 | 
			
		||||
	             }
 | 
			
		||||
             
 | 
			
		||||
	             string eventCallingFunction = (string) request["Event-Calling-Function"];
 | 
			
		||||
	             if (eventCallingFunction == null)
 | 
			
		||||
	             {
 | 
			
		||||
	                 eventCallingFunction = "sofia_reg_parse_auth";
 | 
			
		||||
	             }
 | 
			
		||||
                 string eventCallingFunction = (string) request["Event-Calling-Function"];
 | 
			
		||||
                 if (eventCallingFunction == null)
 | 
			
		||||
                 {
 | 
			
		||||
                     eventCallingFunction = "sofia_reg_parse_auth";
 | 
			
		||||
                 }
 | 
			
		||||
 | 
			
		||||
	             if (eventCallingFunction.Length == 0)
 | 
			
		||||
	             {
 | 
			
		||||
	                 eventCallingFunction = "sofia_reg_parse_auth";
 | 
			
		||||
	             }
 | 
			
		||||
                 if (eventCallingFunction.Length == 0)
 | 
			
		||||
                 {
 | 
			
		||||
                     eventCallingFunction = "sofia_reg_parse_auth";
 | 
			
		||||
                 }
 | 
			
		||||
             
 | 
			
		||||
	             if (eventCallingFunction == "sofia_reg_parse_auth")
 | 
			
		||||
	             {
 | 
			
		||||
	                 string sipAuthMethod = (string)request["sip_auth_method"];
 | 
			
		||||
                 if (eventCallingFunction == "sofia_reg_parse_auth")
 | 
			
		||||
                 {
 | 
			
		||||
                     string sipAuthMethod = (string)request["sip_auth_method"];
 | 
			
		||||
                 
 | 
			
		||||
	                 if (sipAuthMethod == "REGISTER")
 | 
			
		||||
	                 {
 | 
			
		||||
	                     response = HandleRegister(Context, Realm, request);
 | 
			
		||||
	                 } 
 | 
			
		||||
	                 else if (sipAuthMethod == "INVITE")  
 | 
			
		||||
	                 {
 | 
			
		||||
	                      response = HandleInvite(Context, Realm, request);
 | 
			
		||||
	                 }
 | 
			
		||||
	                 else
 | 
			
		||||
	                 {
 | 
			
		||||
	                     m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod);
 | 
			
		||||
	                     response["int_response_code"] = 404;
 | 
			
		||||
	                     response["content_type"] = "text/xml";
 | 
			
		||||
	                     response["str_response_string"] = "";
 | 
			
		||||
	                 }
 | 
			
		||||
	             }
 | 
			
		||||
	             else if (eventCallingFunction == "switch_xml_locate_user")
 | 
			
		||||
	             {
 | 
			
		||||
	                 response = HandleLocateUser(Realm, request);
 | 
			
		||||
	             }
 | 
			
		||||
	             else if (eventCallingFunction == "user_data_function") // gets called when an avatar to avatar call is made
 | 
			
		||||
	             {
 | 
			
		||||
	                  response = HandleLocateUser(Realm, request);
 | 
			
		||||
	             }
 | 
			
		||||
	             else if (eventCallingFunction == "user_outgoing_channel")
 | 
			
		||||
	             {
 | 
			
		||||
	                 response = HandleRegister(Context, Realm, request);
 | 
			
		||||
	             }
 | 
			
		||||
	             else if (eventCallingFunction == "config_sofia") // happens once on freeswitch startup
 | 
			
		||||
	             {
 | 
			
		||||
	                 response = HandleConfigSofia(Context, Realm, request);
 | 
			
		||||
	             }
 | 
			
		||||
	             else if (eventCallingFunction == "switch_load_network_lists")
 | 
			
		||||
	             {
 | 
			
		||||
	                 //response = HandleLoadNetworkLists(request);
 | 
			
		||||
	                 response["int_response_code"] = 404;
 | 
			
		||||
	                 response["keepalive"] = false;
 | 
			
		||||
	                 response["content_type"] = "text/xml";
 | 
			
		||||
	                 response["str_response_string"] = "";
 | 
			
		||||
	             }
 | 
			
		||||
	             else
 | 
			
		||||
	             {
 | 
			
		||||
	                 m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown Event-Calling-Function {0}",eventCallingFunction);
 | 
			
		||||
	                 response["int_response_code"] = 404;
 | 
			
		||||
	                 response["keepalive"] = false;
 | 
			
		||||
	                 response["content_type"] = "text/xml";
 | 
			
		||||
	                 response["str_response_string"] = "";
 | 
			
		||||
	             }
 | 
			
		||||
			}
 | 
			
		||||
			return response;   
 | 
			
		||||
                     if (sipAuthMethod == "REGISTER")
 | 
			
		||||
                     {
 | 
			
		||||
                         response = HandleRegister(Context, Realm, request);
 | 
			
		||||
                     } 
 | 
			
		||||
                     else if (sipAuthMethod == "INVITE")  
 | 
			
		||||
                     {
 | 
			
		||||
                          response = HandleInvite(Context, Realm, request);
 | 
			
		||||
                     }
 | 
			
		||||
                     else
 | 
			
		||||
                     {
 | 
			
		||||
                         m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod);
 | 
			
		||||
                         response["int_response_code"] = 404;
 | 
			
		||||
                         response["content_type"] = "text/xml";
 | 
			
		||||
                         response["str_response_string"] = "";
 | 
			
		||||
                     }
 | 
			
		||||
                 }
 | 
			
		||||
                 else if (eventCallingFunction == "switch_xml_locate_user")
 | 
			
		||||
                 {
 | 
			
		||||
                     response = HandleLocateUser(Realm, request);
 | 
			
		||||
                 }
 | 
			
		||||
                 else if (eventCallingFunction == "user_data_function") // gets called when an avatar to avatar call is made
 | 
			
		||||
                 {
 | 
			
		||||
                      response = HandleLocateUser(Realm, request);
 | 
			
		||||
                 }
 | 
			
		||||
                 else if (eventCallingFunction == "user_outgoing_channel")
 | 
			
		||||
                 {
 | 
			
		||||
                     response = HandleRegister(Context, Realm, request);
 | 
			
		||||
                 }
 | 
			
		||||
                 else if (eventCallingFunction == "config_sofia") // happens once on freeswitch startup
 | 
			
		||||
                 {
 | 
			
		||||
                     response = HandleConfigSofia(Context, Realm, request);
 | 
			
		||||
                 }
 | 
			
		||||
                 else if (eventCallingFunction == "switch_load_network_lists")
 | 
			
		||||
                 {
 | 
			
		||||
                     //response = HandleLoadNetworkLists(request);
 | 
			
		||||
                     response["int_response_code"] = 404;
 | 
			
		||||
                     response["keepalive"] = false;
 | 
			
		||||
                     response["content_type"] = "text/xml";
 | 
			
		||||
                     response["str_response_string"] = "";
 | 
			
		||||
                 }
 | 
			
		||||
                 else
 | 
			
		||||
                 {
 | 
			
		||||
                     m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown Event-Calling-Function {0}",eventCallingFunction);
 | 
			
		||||
                     response["int_response_code"] = 404;
 | 
			
		||||
                     response["keepalive"] = false;
 | 
			
		||||
                     response["content_type"] = "text/xml";
 | 
			
		||||
                     response["str_response_string"] = "";
 | 
			
		||||
                 }
 | 
			
		||||
            }
 | 
			
		||||
            return response;   
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
         private Hashtable HandleRegister(string Context, string Realm, Hashtable request)
 | 
			
		||||
        private Hashtable HandleRegister(string Context, string Realm, Hashtable request)
 | 
			
		||||
        {
 | 
			
		||||
            m_log.Info("[FreeSwitchDirectory] HandleRegister called");
 | 
			
		||||
            
 | 
			
		||||
| 
						 | 
				
			
			@ -156,7 +155,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
 | 
			
		|||
            response["keepalive"] = false;
 | 
			
		||||
            response["int_response_code"] = 200;
 | 
			
		||||
 | 
			
		||||
           	response["str_response_string"] = String.Format(
 | 
			
		||||
            response["str_response_string"] = String.Format(
 | 
			
		||||
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" +
 | 
			
		||||
                "<document type=\"freeswitch/xml\">\r\n" +
 | 
			
		||||
                    "<section name=\"directory\" description=\"User Directory\">\r\n" +
 | 
			
		||||
| 
						 | 
				
			
			@ -225,8 +224,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
 | 
			
		|||
                
 | 
			
		||||
            return response;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        private Hashtable HandleLocateUser(String Realm, Hashtable request)
 | 
			
		||||
        {
 | 
			
		||||
            m_log.Info("[FreeSwitchDirectory] HandleLocateUser called");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -95,7 +95,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
 | 
			
		|||
        // private static IPEndPoint m_FreeSwitchServiceIP;
 | 
			
		||||
        private int m_freeSwitchServicePort;
 | 
			
		||||
        private string m_openSimWellKnownHTTPAddress;
 | 
			
		||||
		private string m_freeSwitchContext;
 | 
			
		||||
        private string m_freeSwitchContext;
 | 
			
		||||
 | 
			
		||||
        private FreeSwitchDirectory m_FreeSwitchDirectory;
 | 
			
		||||
        private FreeSwitchDialplan m_FreeSwitchDialplan;
 | 
			
		||||
| 
						 | 
				
			
			@ -152,7 +152,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
 | 
			
		|||
                    m_freeSwitchDefaultTimeout = m_config.GetInt("freeswitch_default_timeout", 5000);
 | 
			
		||||
                    // m_freeSwitchSubscribeRetry = m_config.GetInt("freeswitch_subscribe_retry", 120);
 | 
			
		||||
                    m_freeSwitchUrlResetPassword = m_config.GetString("freeswitch_password_reset_url", String.Empty);
 | 
			
		||||
					m_freeSwitchContext = m_config.GetString("freeswitch_context", "public");
 | 
			
		||||
                    m_freeSwitchContext = m_config.GetString("freeswitch_context", "public");
 | 
			
		||||
                    
 | 
			
		||||
                    if (String.IsNullOrEmpty(m_freeSwitchServerUser) ||
 | 
			
		||||
                        String.IsNullOrEmpty(m_freeSwitchServerPass) ||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -924,9 +924,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
 | 
			
		|||
 | 
			
		||||
                // Bug in Vivox Server r2978 where count returns 0
 | 
			
		||||
                // Found by Adam
 | 
			
		||||
                if(channels == 0)
 | 
			
		||||
                if (channels == 0)
 | 
			
		||||
                {
 | 
			
		||||
                    for(int j=0;j<100;j++)
 | 
			
		||||
                    for (int j=0;j<100;j++)
 | 
			
		||||
                    {
 | 
			
		||||
                        string tmpId;
 | 
			
		||||
                        if (!XmlFind(resp, "response.level0.channel-search.channels.channels.level4.id", j, out tmpId))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -724,17 +724,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
 | 
			
		|||
                remoteClient.SendCreateGroupReply(UUID.Zero, false, "A group with the same name already exists.");
 | 
			
		||||
                return UUID.Zero;
 | 
			
		||||
            }
 | 
			
		||||
			// is there is a money module present ?
 | 
			
		||||
			IMoneyModule money=remoteClient.Scene.RequestModuleInterface<IMoneyModule>();
 | 
			
		||||
            // is there is a money module present ?
 | 
			
		||||
            IMoneyModule money=remoteClient.Scene.RequestModuleInterface<IMoneyModule>();
 | 
			
		||||
            if (money != null)
 | 
			
		||||
            {
 | 
			
		||||
			  // do the transaction, that is if the agent has got sufficient funds
 | 
			
		||||
              if (!money.GroupCreationCovered(remoteClient)) {
 | 
			
		||||
                remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group.");
 | 
			
		||||
                return UUID.Zero;
 | 
			
		||||
              }
 | 
			
		||||
              money.ApplyGroupCreationCharge(remoteClient.AgentId);
 | 
			
		||||
			}
 | 
			
		||||
                // do the transaction, that is if the agent has got sufficient funds
 | 
			
		||||
                if (!money.GroupCreationCovered(remoteClient)) {
 | 
			
		||||
                    remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group.");
 | 
			
		||||
                    return UUID.Zero;
 | 
			
		||||
                }
 | 
			
		||||
                money.ApplyGroupCreationCharge(remoteClient.AgentId);
 | 
			
		||||
            }
 | 
			
		||||
            UUID groupID = m_groupData.CreateGroup(grID, name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, remoteClient.AgentId);
 | 
			
		||||
 | 
			
		||||
            remoteClient.SendCreateGroupReply(groupID, true, "Group created successfullly");
 | 
			
		||||
| 
						 | 
				
			
			@ -743,7 +743,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
 | 
			
		|||
            SendAgentGroupDataUpdate(remoteClient, remoteClient.AgentId);
 | 
			
		||||
 | 
			
		||||
            return groupID;
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID groupID)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -181,7 +181,7 @@ namespace OpenSim.Region.Physics.Manager
 | 
			
		|||
        /// <param name="direction">Direction of the ray</param>
 | 
			
		||||
        /// <param name="length">Length of ray in meters</param>
 | 
			
		||||
        /// <param name="retMethod">Method to call when the raycast is complete</param>
 | 
			
		||||
        public virtual void RaycastWorld( Vector3 position, Vector3 direction, float length, RaycastCallback retMethod)
 | 
			
		||||
        public virtual void RaycastWorld(Vector3 position, Vector3 direction, float length, RaycastCallback retMethod)
 | 
			
		||||
        {
 | 
			
		||||
            if (retMethod != null)
 | 
			
		||||
                retMethod(false, Vector3.Zero, 0, 999999999999f);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ namespace OpenSim.Region.Physics.OdePlugin
 | 
			
		|||
        private List<ContactResult> m_contactResults = new List<ContactResult>();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public ODERayCastRequestManager( OdeScene pScene)
 | 
			
		||||
        public ODERayCastRequestManager(OdeScene pScene)
 | 
			
		||||
        {
 | 
			
		||||
            m_scene = pScene;
 | 
			
		||||
            nearCallback = near;
 | 
			
		||||
| 
						 | 
				
			
			@ -149,7 +149,7 @@ namespace OpenSim.Region.Physics.OdePlugin
 | 
			
		|||
            // Find closest contact and object.
 | 
			
		||||
            lock (m_contactResults)
 | 
			
		||||
            {
 | 
			
		||||
                foreach(ContactResult cResult in m_contactResults)
 | 
			
		||||
                foreach (ContactResult cResult in m_contactResults)
 | 
			
		||||
                {
 | 
			
		||||
                    if (Vector3.Distance(req.Origin, cResult.Pos) < Vector3.Distance(req.Origin, closestcontact))
 | 
			
		||||
                    {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9019,20 +9019,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
 | 
			
		|||
            if (userAgent != null)
 | 
			
		||||
                httpHeaders["User-Agent"] = userAgent;
 | 
			
		||||
 | 
			
		||||
			string authregex = @"^(https?:\/\/)(\w+):(\w+)@(.*)$";
 | 
			
		||||
			Regex r = new Regex(authregex);
 | 
			
		||||
			int[] gnums = r.GetGroupNumbers();
 | 
			
		||||
			Match m = r.Match(url);
 | 
			
		||||
			if ( m.Success ) {
 | 
			
		||||
				for (int i = 1; i < gnums.Length; i++) {
 | 
			
		||||
					System.Text.RegularExpressions.Group g = m.Groups[gnums[i]];
 | 
			
		||||
					CaptureCollection cc = g.Captures;
 | 
			
		||||
				}	
 | 
			
		||||
				if ( m.Groups.Count == 5 ) {
 | 
			
		||||
					httpHeaders["Authorization"] = String.Format("Basic {0}", Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes(m.Groups[2].ToString() + ":" + m.Groups[3].ToString())));
 | 
			
		||||
					url = m.Groups[1].ToString() + m.Groups[4].ToString();
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
            string authregex = @"^(https?:\/\/)(\w+):(\w+)@(.*)$";
 | 
			
		||||
            Regex r = new Regex(authregex);
 | 
			
		||||
            int[] gnums = r.GetGroupNumbers();
 | 
			
		||||
            Match m = r.Match(url);
 | 
			
		||||
            if (m.Success) {
 | 
			
		||||
                for (int i = 1; i < gnums.Length; i++) {
 | 
			
		||||
                    System.Text.RegularExpressions.Group g = m.Groups[gnums[i]];
 | 
			
		||||
                    CaptureCollection cc = g.Captures;
 | 
			
		||||
                }    
 | 
			
		||||
                if (m.Groups.Count == 5) {
 | 
			
		||||
                    httpHeaders["Authorization"] = String.Format("Basic {0}", Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes(m.Groups[2].ToString() + ":" + m.Groups[3].ToString())));
 | 
			
		||||
                    url = m.Groups[1].ToString() + m.Groups[4].ToString();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            UUID reqID = httpScriptMod.
 | 
			
		||||
                StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue