Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005267opensim[REGION] Specific OpenSim Modulepublic2010-12-12 09:482011-05-06 18:52
Reporteraiaustin 
Assigned Toaiaustin 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0005267: Freeswitch configuration changes for grids and serving URL http://robust-server-ip:8002/fsapi/freeswitch-config [^]
DescriptionThere have been changes to allow the FreeSwitch service modules to run in a grid services Robust.exe shell for grids... and the .ini./examples files use /fsapi rather than the previous /api in the URls used to provide configuration inmformation.

We believe that a URL such as http://129.215.219.138:8002/fsapi/freeswitch-config [^] (where 129.215.219.138 is the IP number for the Robust grid services for Openvue) is reaching the Robust server and it seems to give an error 500 - rather than 404 - if the URL is tried in a standard browser). But the FreeSwitch VOIP server itself still shows a red error similar to that observed before these conmfiguration chnages.

Is this expected, or should a configuration file in a permitted form be being passed back to the FreeSwitch VOIP service when it asks for such a URL?

This is a query I believe for Melanie.
Additional Information2010-12-10 14:14:57.354600 [ERR] mod_xml_curl.c:252 Received HTTP error 404 tryi
ng to fetch http://129.215.219.138:8002/fsapi/freeswitch-config [^]
data: [hostname=shuna&section=directory&tag_name=domain&key_name=name&key_value=
129.215.219.143&Event-Name=GENERAL&Core-UUID=f7dd46f2-0abe-9747-972a-0639752eb20
3&FreeSWITCH-Hostname=shuna&FreeSWITCH-IPv4=129.215.219.143&FreeSWITCH-IPv6=2002
%3A81d7%3Adb8f%3A%3A81d7%3Adb8f&Event-Date-Local=2010-12-10%2014%3A14%3A57&Event
-Date-GMT=Fri,%2010%20Dec%202010%2014%3A14%3A57%20GMT&Event-Date-Timestamp=12919
90497297600&Event-Calling-File=switch_core.c&Event-Calling-Function=switch_load_
network_lists&Event-Calling-Line-Number=984&domain=129.215.219.143&purpose=netwo
rk-list]
TagsNo tags attached.
Git Revision or version number0.7.1 Dev Master
Run Mode Grid (Multiple Regions per Sim)
Physics EngineODE
Environment.NET / Windows32
Mono VersionNone
ViewerSL Viewer 1.23.5
Attached Files

- Relationships
related to 0005274closedaiaustin Freeswitch is confusing port 8002 and 9000 in messages from OpenSim, and wrong use of 8003 in OpenSim.ini.example 

-  Notes
(0017599)
aiaustin (developer)
2010-12-14 11:57
edited on: 2010-12-15 14:13

In testing to get OpenSim working with Freeswitch with the new configuration using Feeswitch connector in Robust.exe... r/16658 we are getting a message of a login attempt to FreeSwitch every second. E.g.

17:06:54 - [FreeSwitchVoice]: FreeSwitchSLVoiceSigninHTTPHandler called
17:06:55 - [FreeSwitchVoice]: FreeSwitchSLVoiceSigninHTTPHandler called
17:06:56 - [FreeSwitchVoice]: FreeSwitchSLVoiceSigninHTTPHandler called
17:06:57 - [FreeSwitchVoice]: FreeSwitchSLVoiceSigninHTTPHandler called
17:06:58 - [FreeSwitchVoice]: FreeSwitchSLVoiceSigninHTTPHandler called
17:06:59 - [FreeSwitchVoice]: FreeSwitchSLVoiceSigninHTTPHandler called

We noticed this on several of our OpenSim.exe instances on several different servers. From a quick scan of the Freeswitch code, this message is printed when a http request is made to:

http://<opensim-server>/<freeswitch_api_prefix>/viv_signin.php [^]

(0017600)
aiaustin (developer)
2010-12-14 12:01
edited on: 2011-01-12 02:58

We are finding that Freeswitch seems to be attempting to use this root for its attempt to call freeswitch_config even though we have configured:

    FreeswitchServiceURL = http://virtual.aiai.ed.ac.uk:8002/fsapi [^]

in all our OpenSim.exe OpenSim.ini files.

Where could this be coming from? Could it be cached in some way at some level? Since we USED to serve the freeswitch_config attempted call from an openSim.exe instance on virtual2.aiai.ed.ac.uk:9000/api note the old style api rather than fsapi as now used.

     http://virtual2.aiai.ed.ac.uk:9000/fsapi/freeswitch_config [^]

From the FreeSwitch code, "http://virtual2.aiai.ed.ac.uk:9000/fsapi/" [^] appears to be composed from the following OpenSim.ini params (i.e. it's not coming from FreeSwitch):

http://<opensim_well_known_http_address>:<freeswitch_service_port><freeswitch_api_prefix> [^]

(0017602)
aiaustin (developer)
2010-12-14 12:57
edited on: 2010-12-15 09:01

We note this in the OpenSim Freeswitch code... AddRegion within FreeSwitchVoiceModule.cs - we are not sure it's an error.. Is it legacy code causing the problems?

            // We generate these like this: The region's external host name
            // as defined in Regions.ini is a good address to use. It's a
            // dotted quad (or should be!) and it can reach this host from
            // a client. The port is grabbed from the region's HTTP server.
            m_openSimWellKnownHTTPAddress = scene.RegionInfo.ExternalHostName;
            m_freeSwitchServicePort = MainServer.Instance.Port;

Note added: this is for the local connector in an Opensim.exe instnace, and is not related to the way the remote connector operates within a Robust shell.

(0017616)
aiaustin (developer)
2010-12-15 09:00
edited on: 2010-12-15 09:14

In the changed Freeswitch setup in 0.7.1 dev recent versions, we have established that if you are using the FreeSwitch remote connector in Robust.exe for a grid then the FreeSwitch config url ends in

   /region-config

If you are using a standalone with local FreeSwitch connector you should use

   /freeswitch-config

Note also that for BOTH setups the old /api Freeswitch API prefix has changed to /fsapi

None of these are currrently configurable.

Also remember to use port 8002 for the remote connector Freeswitch URL as that is what your Robust.ini or Robust.HG.ini will have in its connector example port, though the current OpenSim.ini.example incorrectly shows port 8003 for this.

So a typical call from Freeswitch will be

  GRID: http://gridserver:8002/fsapi/region-config [^]

  STANDALONE: http://simserver:9000/fsapi/freeswitch-config [^]

It would be helpful if Melanie could confirm this was intended, and state if she intends the grid and standalone served api prefixes and continuation URLs to differ as noted above, or if they would be better being uniform to prevent user configuration difficulties.

We continue to investigate, since even having established this we are now failing to parse the XML returned by the call in our FreeSwitch servers using both Freeswitch 1.0.4 stable release, and the lastest .msi Windows installer for the weekly builds.

When things settle down and the final setup for 0.7.1 release is agreed the Wiki needs to be brought in line, as its now misleading and should only be used for setting up 0.6.9, 0.7.0.1 and 0.7.0.2.

(0017822)
aiaustin (developer)
2011-01-12 03:03

We are coming back to try to get our Freeswitch setup working again with the new configuration in 0.7.1 dev master as a test. It stopped working when we installed r/14628 though we believe we made the changes to the configs of both our OpenSim and FreeSwitch servers such that it should have worked.

We are now on OpenSim r/14571 or later and will try again to track down the problem. Our setup is a Robust Grid services on onme system, with separate region servers and Freeswitcvh on a third server, all on the same local network. Firewalls are all open and the setup worked with the old configuration prior to the update to r/14628.

Question for Melanie, do we have to be using any specific version of Freeswitch? Do you use the latest build in your own environment?
(0017826)
jabba (reporter)
2011-01-13 02:39

I am getting quite far - I guess... (using freeswitch in grid mode)
opensim-4ac5809.tar.gz
FreeSWITCH version: 1.0.head (git-) (installed october 2010 and was working properly in standalone mode a few months ago)

in /usr/local/freeswitch/conf/autoload_configs/xml_curl.conf.xml I've updated:

       <binding name="example">
               <param name="gateway-url" value="http://78.46.22.11:8002/fsapi/region-config" [^] bindings="directory"/>
               <param name="gateway-credentials" value="freeswitch:password"/>
               <param name="disable-100-continue" value="true"/>
       </binding>
       <binding name="local">
               <param name="gateway-url" value="http://78.46.22.11:8002/fsapi/region-config" [^] bindings="dialplan"/>
               <param name="gateway-credentials" value="freeswitch:password"/>
               <param name="disable-100-continue" value="true"/>
       </binding>


In Robust.ini:

; * This is the configuration for the freeswitch server in grid mode
[FreeswitchService]
    LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService"
    ;; IP of your FS server
    ServerAddress = 78.46.22.11

    ;; All other options are - well - optional
    Realm = "78.46.22.11"
    ; SIPProxy = "78.46.22.11:5060"
    ; EchoServer = "78.46.22.11"
    ; EchoPort = 50505
    ; AttemptSTUN = "false"
    ; DefaultTimeout = 5000
    ; Context = "default"
    ; UserName = "freeswitch"
    ; Password = "password"

In OpenSim.ini:

[FreeSwitchVoice]
    ;; In order for this to work you need a functioning FreeSWITCH PBX set up.
    ;; Configuration details at http://opensimulator.org/wiki/Freeswitch_Module [^]
    Enabled = true

    ;; You need to load a local service for a standalone, and a remote service
    ;; for a grid region. Use one of the lines below, as appropriate
    ; LocalServiceModule = OpenSim.Services.FreeswitchService.dll:FreeswitchService
    LocalServiceModule = OpenSim.Services.Connectors.dll:RemoteFreeswitchConnector

    ;; If using a remote module, specify the server URL
    FreeswitchServiceURL = http://grid.annuna.net:8002/fsapi [^]


Now I get the following error messages in Robust.log:


2011-01-13 11:12:47.475407 [ERR] switch_xml.c:1621 Error[[error near line 1]: root tag missing]
2011-01-13 11:12:47.476423 [WARNING] sofia_reg.c:1988 Can't find user [xiJI_L3ETS5SgWhcTuSd24g==@78.46.22.11]
You must define a domain called '78.46.22.11' in your directory and add a user with the id="xiJI_L3ETS5SgWhcTuSd24g==" attribute
and you must configure your device to use the proper domain in it's authentication credentials.
2011-01-13 11:12:47.494335 [WARNING] sofia_reg.c:1088 SIP auth failure (REGISTER) on sofia profile 'internal' for [xiJI_L3ETS5SgWhcTuSd24g==@78.46.22.11] from ip 145.253.64.227
(0017827)
aiaustin (developer)
2011-01-13 02:45

jabba, thats what we get also, and its been like that since we changed the configuration. Things used to work fine up to then (right from 0.6.9, through 0.7.0.1 and 0.7.0.2 and including 0.7.1 dev master up to that time) with the setup as described at http://opensimulator.org/wiki/Freeswitch [^]
(0017829)
aiaustin (developer)
2011-01-13 05:00
edited on: 2011-01-13 08:34

I believe that the FreeswitchServiceURL port example in the OpenSim.ini.example should be 8002 not 8003

    ;; If using a remote module, specify the server URL
    ; FreeswitchServiceURL = http://my.grid.server:8002/fsapi [^]

to match the setup in the example connectors in the Robust.HG.ini.example and Robust.ini.example files.

(0017838)
aiaustin (developer)
2011-01-13 08:34
edited on: 2011-01-13 08:35

jabba... use the following in your Freeswitch server file xml_curl.conf.xml (found in .../freeswitch/conf/autoload_configs) for the two occurrences..

http://robust-server-ip-num:8002/fsapi/freeswitch-config [^]

and not the region-config URL we wrongly thought might be needed for grids.

Make sure you state the same port in OpenSim.ini that you use in your Robust(.HG).ini which is set as 8002 in those. In the current OpenSim.ini.example its givesn as 8003 in the example there.

If you do that your working Freeswitch setup that previously worked should then work fine.

(0017840)
jabba (reporter)
2011-01-13 10:28
edited on: 2011-01-13 10:28

aiaustin, thanks - this was the last thing to change. My autoload_configs/xml_curl.conf.xml now looks like this:

<configuration name="xml_curl.conf" description="cURL XML Gateway">
  <bindings>
       <binding name="example">
               <param name="gateway-url" value="http://78.46.22.11:8002/fsapi/freeswitch-config" [^] bindings="directory"/>
               <param name="gateway-credentials" value="freeswitch:password"/>
               <param name="disable-100-continue" value="true"/>
       </binding>
       <binding name="local">
               <param name="gateway-url" value="http://78.46.22.11:8002/fsapi/freeswitch-config" [^] bindings="dialplan"/>
               <param name="gateway-credentials" value="freeswitch:password"/>
               <param name="disable-100-continue" value="true"/>
       </binding>
  </bindings>
</configuration>

Freeswitch is now working like a charm (tested with two accounts). As I've seen you've already updated the wiki ;-).
http://opensimulator.org/wiki/Freeswitch [^]

(0017844)
aiaustin (developer)
2011-01-14 02:32

Freeswitch tests okay and Wiki entry at http://opensimulator.org/wiki/Freeswitch_Module [^] [^] amended by melanie and aiaustin to assist users.

OpenSim.ini.example should be amended to have port 8002 in commented example rather than port 8003 to assist users.

    ;; If using a remote module, specify the server URL
    ; FreeswitchServiceURL = http://my.grid.server:8002/fsapi [^]

- Issue History
Date Modified Username Field Change
2010-12-12 09:48 aiaustin New Issue
2010-12-12 09:48 aiaustin Git Revision => 0.7.1 Dev Master
2010-12-12 09:48 aiaustin SVN Revision => 14628
2010-12-12 09:48 aiaustin Run Mode => Grid (Multiple Regions per Sim)
2010-12-12 09:48 aiaustin Physics Engine => ODE
2010-12-12 09:48 aiaustin Environment => .NET / Windows32
2010-12-12 09:48 aiaustin Mono Version => None
2010-12-12 09:48 aiaustin Viewer => SL Viewer 1.23.5
2010-12-12 09:52 aiaustin Note Added: 0017558
2010-12-14 11:57 aiaustin Note Added: 0017599
2010-12-14 12:01 aiaustin Note Added: 0017600
2010-12-14 12:57 aiaustin Note Added: 0017602
2010-12-14 13:23 aiaustin Note Edited: 0017602
2010-12-15 09:00 aiaustin Note Added: 0017616
2010-12-15 09:01 aiaustin Note Edited: 0017602
2010-12-15 09:06 aiaustin Note Edited: 0017616
2010-12-15 09:13 aiaustin Note Edited: 0017616
2010-12-15 09:13 aiaustin Note Edited: 0017616
2010-12-15 09:14 aiaustin Note Edited: 0017616
2010-12-15 09:14 aiaustin Note Edited: 0017616
2010-12-15 14:13 aiaustin Note Deleted: 0017558
2010-12-15 14:13 aiaustin Note Edited: 0017599
2011-01-12 02:58 aiaustin Note Edited: 0017600
2011-01-12 02:58 aiaustin Note Edited: 0017600
2011-01-12 03:03 aiaustin Note Added: 0017822
2011-01-13 02:39 jabba Note Added: 0017826
2011-01-13 02:45 aiaustin Note Added: 0017827
2011-01-13 02:47 aiaustin Relationship added related to 0005274
2011-01-13 05:00 aiaustin Note Added: 0017829
2011-01-13 05:59 aiaustin Note Added: 0017831
2011-01-13 06:09 aiaustin Note Deleted: 0017831
2011-01-13 08:34 aiaustin Note Added: 0017838
2011-01-13 08:34 aiaustin Note Edited: 0017829
2011-01-13 08:35 aiaustin Note Edited: 0017838
2011-01-13 10:28 jabba Note Added: 0017840
2011-01-13 10:28 jabba Note Edited: 0017840
2011-01-14 02:32 aiaustin Status new => resolved
2011-01-14 02:32 aiaustin Resolution open => fixed
2011-01-14 02:32 aiaustin Assigned To => aiaustin
2011-01-14 02:32 aiaustin Note Added: 0017844
2011-05-06 18:52 chi11ken Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker