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
Assigned Toaiaustin 
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 [^] (where 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 [^]
data: [hostname=shuna&section=directory&tag_name=domain&key_name=name&key_value=
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
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 [^]

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 = [^]

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 note the old style api rather than fsapi as now used. [^]

From the FreeSwitch code, "" [^] 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> [^]

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.

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


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


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, and

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?
jabba (reporter)
2011-01-13 02:39

I am getting quite far - I guess... (using freeswitch in grid mode)
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="" [^] bindings="directory"/>
               <param name="gateway-credentials" value="freeswitch:password"/>
               <param name="disable-100-continue" value="true"/>
       <binding name="local">
               <param name="gateway-url" value="" [^] bindings="dialplan"/>
               <param name="gateway-credentials" value="freeswitch:password"/>
               <param name="disable-100-continue" value="true"/>

In Robust.ini:

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

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

In OpenSim.ini:

    ;; In order for this to work you need a functioning FreeSWITCH PBX set up.
    ;; Configuration details at [^]
    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 = [^]

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==@]
You must define a domain called '' 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==@] from ip
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 and and including 0.7.1 dev master up to that time) with the setup as described at [^]
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.

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.

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">
       <binding name="example">
               <param name="gateway-url" value="" [^] bindings="directory"/>
               <param name="gateway-credentials" value="freeswitch:password"/>
               <param name="disable-100-continue" value="true"/>
       <binding name="local">
               <param name="gateway-url" value="" [^] bindings="dialplan"/>
               <param name="gateway-credentials" value="freeswitch:password"/>
               <param name="disable-100-continue" value="true"/>

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

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

Freeswitch tests okay and Wiki entry at [^] [^] 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