MantisBT - opensim
View Issue Details
0005274opensim[REGION] Specific OpenSim Modulepublic2010-12-14 12:412011-05-06 18:52
closedno change required 
master (dev code) 
0.7.1 Dev Master
Grid (Multiple Regions per Sim)
.NET / Windows32
0005274: Freeswitch is confusing port 8002 and 9000 in messages from OpenSim, and wrong use of 8003 in OpenSim.ini.example
Though we have set our Freeswitch service URL via our Robust.exe server connector to: [^]

Freeswitch seems to be getting messages to ask it to look at port 9000 on a OpenSim.exe that communicates with it, e.g.... [^] [^]

Note here use of the OpenSim.exe host name and port 9000 rather than Robust.exe port and port 8002. We do have the remote connector for FreeSwitch set in our openSim.ini files.

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

Also note that OpenSim.ini.example has port :8003 in the example

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

Whereas the Robust.HG.ini.example connector uses port 8002.
Something odd is happening, probably indicating that a wrong server URL and port might be being served.. we have tried to do these tests in a fresh instance of running Robust.exe and OpenSim.exe without multiple OpenSim.exe's runnig on different hosts.

Here is the OpenSim.exe console log extracts...

2010-12-14 20:21:36,266 DEBUG - OpenSim.Services.Connectors.RemoteFreeswitchConnector [FREESWITCH CONNECTOR]: Requesting config from [^]

2010-12-14 20:21:36,379 INFO - OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice.FreeSwitchVoiceModule [FreeSwitchVoice] using FreeSwitch server

2010-12-14 20:21:36,380 INFO - OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice.FreeSwitchVoiceModule [FreeSwitchVoice] plugin enabled

2010-12-14 20:23:32,988 DEBUG - OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice.FreeSwitchVoiceModule [FreeSwitchVoice][PROVISIONVOICE]: avatar "Ai Austin": <llsd><map><key>username</key><string>x4kqQFfXKRSuMldMuNMudZA==</string><key>password</key><string>1234</string><key>voice_sip_uri_hostname</key><string></string><key>voice_account_server_name</key><string></string></map></llsd> [^]

2010-12-14 20:23:33,099 DEBUG - OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice.FreeSwitchVoiceModule [FreeSwitchVoice] FreeSwitchSLVoiceGetPreloginHTTPHandler called

2010-12-14 20:23:33,204 DEBUG - OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice.FreeSwitchVoiceModule [FreeSwitchVoice] FreeSwitchSLVoiceSigninHTTPHandler called

No tags attached.
related to 0005267closed aiaustin Freeswitch configuration changes for grids and serving URL http://robust-server-ip:8002/fsapi/freeswitch-config [^
Issue History
2010-12-14 12:41aiaustinNew Issue
2010-12-14 12:41aiaustinGit Revision => 0.7.1 Dev Master
2010-12-14 12:41aiaustinSVN Revision => 14658
2010-12-14 12:41aiaustinRun Mode => Grid (Multiple Regions per Sim)
2010-12-14 12:41aiaustinPhysics Engine => ODE
2010-12-14 12:41aiaustinEnvironment => .NET / Windows32
2010-12-14 12:41aiaustinMono Version => None
2010-12-14 12:46aiaustinSummaryFreeswitch is confusing port 8002 and 9000 in messages communicated to Freeswitch, and wrong use of 8003 in OpenSim.ini.example => Freeswitch is confusing port 8002 and 9000 in messages from OpenSim, and wrong use of 8003 in OpenSim.ini.example
2010-12-14 12:46aiaustinDescription Updated
2010-12-14 12:46aiaustinAdditional Information Updated
2010-12-14 12:51aiaustinNote Added: 0017601
2010-12-14 12:51aiaustinNote Edited: 0017601
2010-12-14 13:01aiaustinNote Added: 0017603
2010-12-14 13:01aiaustinNote Edited: 0017603
2010-12-14 13:08melanieNote Added: 0017604
2010-12-14 13:09aiaustinDescription Updated
2010-12-14 13:12aiaustinNote Added: 0017605
2010-12-14 13:18aiaustinNote Deleted: 0017603
2010-12-14 13:21aiaustinNote Edited: 0017605
2010-12-14 14:35aiaustinNote Edited: 0017605
2011-01-12 03:06aiaustinNote Added: 0017823
2011-01-12 03:12melanieNote Added: 0017824
2011-01-13 02:47aiaustinRelationship addedrelated to 0005267
2011-01-13 02:50aiaustinNote Added: 0017828
2011-01-13 05:02aiaustinNote Added: 0017830
2011-01-13 06:10aiaustinNote Added: 0017832
2011-01-13 06:14aiaustinNote Added: 0017833
2011-01-13 06:16aiaustinNote Edited: 0017828
2011-01-13 06:16aiaustinNote Deleted: 0017830
2011-01-13 07:00melanieNote Added: 0017834
2011-01-13 08:03aiaustinNote Added: 0017835
2011-01-13 08:04aiaustinNote Edited: 0017835
2011-01-13 08:04aiaustinNote Deleted: 0017833
2011-01-13 08:09melanieNote Added: 0017836
2011-01-13 08:24aiaustinNote Added: 0017837
2011-01-13 08:38aiaustinNote Added: 0017839
2011-01-13 08:55aiaustinNote Edited: 0017839
2011-01-14 02:30aiaustinStatusnew => resolved
2011-01-14 02:30aiaustinResolutionopen => no change required
2011-01-14 02:30aiaustinAssigned To => aiaustin
2011-01-14 02:30aiaustinNote Added: 0017843
2011-05-06 18:52chi11kenStatusresolved => closed

2010-12-14 12:51   
re: http://<opensim_well_known_http_address>:<freeswitch_service_port><freeswitch_api_prefix> [^]

We can find no instance of these three parameters any longer in 0.7.1 dev master r/16568 files in these config files we are using, or the example files they are based on.


or even OpenSimDefaults.ini

2010-12-14 13:08   
There is a lot of spammy debug in that connector still. And the sim WILL be hit by freeswitch on it's port, it's all automagical and all giid. I have several installations running FS successfully.
2010-12-14 13:12   
(edited on: 2010-12-14 14:35)
We had a successful setup under the previous regime that was operating very solidly, but have not (YET) been able to get it to work since changing the config files Melanie. We have now tested with 1.0.4 and latest Freeswitch with no success.

Do you believe it should work if the Robust.exe service is on a different host to Freeswitch.exe service... as one difference in setup we note is that we previously used to have Freeswitch.exe use the OpenSim.exe that we ran with one region on the same machine... but have not established if that is REQUIRED or not.

2011-01-12 03:06   
Melanie, can you let us know which version of Freeswitch you are using successfully?

Our own setup stopped working at r/14628 when we used the new config setup, though we believe we altered it suitably in the Robust, OpenSim and FreeSwitch servers. We plan to try to track down what the issues is or report on Mantis if we find problems in the run up to 0.7.1 release prep.
2011-01-12 03:12   
I use an old one, 1.0.4pre4. Works like a charm on 4 public grids I maintain.
2011-01-13 02:50   
(edited on: 2011-01-13 06:16)
Thanks melanie. we are still trying to track down why this does not work since the config changes. Can you take a look at the related mantis entry 5267 and perhaps comment on whether we are using the correct URL for grids and standalones (i.e. they seem to differ - region-config and freeswitch-config) there? [^]

2011-01-13 06:10   
melanie, we have a working Freeswitch setup now with OpenSim r/14751 0.7.1 dev master in HG grid mode using Robust.

BUT, it does seem like its fragile to the /fsapi served URL used.. and we wonder if the "automagical" setup is being done with "freeswitch-config" requwest.. yet the grid moded remote connector is actually returning the config on "region-config".

Can you clarify what is wanted? Maybe the grid mode setup should be served on "freeswitch-config" as well and its just a mistake in the remote connector code?

I assume the OpenSim.ini.example port should be 8002 not 8002 as in the current example? If it si meant to be 8003, then the examples given in Robust.ini.example and Robust.HG.ini.example should be changed to be the same.. as they say 8002 at present.

It would be helpful to let us continue testing if you could clarify the intention melanie.
Also, we are getting a LOT of Freeswitch diagnostic messages in the Robust.exe console... maybe a good idea initially... but perhaps the default out to be a little less in general use?
2011-01-13 07:00   
No, we should most certainly not make region-config into freeswitch-config. Those two serve completely different purposes and there are different data formats in use.
The service is good as it is.

The issues people have come from a misconfigured freeswitch, specifically, the freeswitch host name needs to be an IP in the fs config files. It is string-compared against the ip in opensim, so using a name here and an address there won't work.

The "define a realm and a user within it" means you have all the opensim parts configured right and your error is in freeswitch.

It would be best to stop the guesswork here. This connector works in 3 major grids and a number of smaller ones. It needs no changes, just the configuration on the freeswitch side is tricky.
2011-01-13 08:03   
(edited on: 2011-01-13 08:04)
Okay, thanks for clarifying that... it helps us narrow down our testing and setup melanie. We do have a working system again now... we were totally confused by the fact that we did not get anything served by "freeswitch-config" but did via "region-config" which we saw in the code and tried to see if we could make progress! Wrongly as it turns out.

But in our apparently working system we get red errors at the FreeSwitch end that seem to indicate that Robust is not ending back a valid config. Its propbably working since the defaults we have configured are right for openSim anyway.

The hostname in the error message indicates that the "hostname" is "shuna" - which is the WINDOWS name for the machine that the Freeswitch service runs on. Though we have used (consistently) the IP number ( for the Freeswitch server in all the configs we changed. The Robust server is on I guess its possible that Freeswitch is reportign itself as "shuna" to OpenSim, which then fails the IP number string comparison test. Do you know which FreeSwitch config file and parameter needs to be altered to set things up properly?

Here is an example of the error message seen in the Freeswitch server console... note IP number everywhere, but "hostname=shuna".

[ERR] mod_xml_curl.c:252 Received HTTP error 404 trying to fetch [^] [^] data: [hostname=shuna&section=directory&tag_name=domain&key_name=name&key_value=,%2010%20Dec%202010%2014%3A14%3A57%20GMT&Event-Date-Timestamp=1291990497297600&Event-Calling-File=switch_core.c&Event-Calling-Function=switch_load_network_lists&Event-Calling-Line-Number=984&domain=]

2011-01-13 08:09   
The curl error is expected, as we don't serve a valid configuration. Freeswitch then falls back to the XML files, which makes it load up properly. This behavior is by design. You're all done, it seems.
2011-01-13 08:24   
Thanks Melanie :-)

We are currently using an older version of Freeswitch... 1.0.4... but have just updated to a recent build dated 2011-01-07 and that works fine too.
2011-01-13 08:38   
(edited on: 2011-01-13 08:55)
If you can amend OpenSim.ini.example to use port 8002 rather than the currently stated port 8003 for the Freeswitch remote connector to match the use of port 8002 for the connector that is already in the 0.7.1 dev master Robust.ini.example and Robust.HG.ini.example files then I think we have everything in shape for 0.7.1 melanie.

2011-01-14 02:30   
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 [^]