Blog

“@fjkktkys: minä olen äiti, ja sinä olet lapsi” You never mentioned you were a mother :D (1 hour ago)

FreeSWITCH module in OpenSim

It seems that Linden Labs has finally changed their code and removed the hardcoded vivox.com references in 1.22; this has opened a lot of possibilities for making voice chat work, which previously required the – still valid – voipforvw project’s SLVoice replacement. There is of course nothing wrong with voipforvw except that it’s a monster that prefers to live under a rock and by its nature does not lend itself easily to compiling; as other internal targets were more important, and the replacement SLVoice was working (and working well, actually) with the Asterisk setup, unfortunately I had pretty much no time to get that project into shape.

To my great relief, Rob Smart from IBM has finally stepped up the game and provided a solution for FreeSWITCH, that works without this SLVoice replacement (I want to note though, that it is only working with the unmodified SLVoice.exe because of the changes in the viewer, and in all likeliness, the Asterisk solution would work just as well). I’ve been eyeing FreeSWITCH for quite a while and just when I finally have some spare time to play around with it, this new module comes out: and it’s really awesome! First of all, it works without jumping through ztdummy/dahdi hoops and mysql realtime configurations, or heaven forbid, RFC4028s.

Setup is very straightforward, and it works even on Windows. To set it up, you will need three components:

First, OpenSim itself. Because the new FreeSWITCH module is experimental, it is only found in trunk, and as usual, please note, that trunk is unstable it might have serious bugs, it can corrupt your data, or eat your children, especially if you do the unthinkable and try to install it in a production environment, which you should never do. Ever! No exceptions. If you are brave enough, you can proceed very carefully and try out the trunk.

Next, obviously, you will need FreeSWITCH. I tried the Windows binary snapshot from here: that works well. For the configuration instructions take a look at the OpenSim wiki page. Linux installation instructions are also included there.

Finally, SecondLife viewer. Only versions later than 1.22 are supported, so be sure to grab a newer version from Linden Labs.

After setting up FreeSWITCH and OpenSim, connecting to the grid and enabling voice chat, one surprising thing will happen by default: that is, nothing. Conference chat won’t work with the default estate settings, because the parcel voice is disabled. In the video, I’m setting “Use a private spatial channel”, but “Use the estate spatial channel” should work as well. Enable voice, and it will work now. After this, conference and private chat features will work. On my setup, I found that private chat is quite clear and easy to understand, but the spatial conferences are way too low quality, but that is probably a configuration issue on my environment.

13 Comments

  1. Diego Viola
    Diego Viola
    Apr 29, 2009

    Freeswitch rocks, it’s the best!

  2. Rataleta
    Rataleta
    May 03, 2009

    Viola, deja de joder con Freeswitch Rocks !! que sos? el novio de Antony Minnesale?

  3. Kai Ludwig
    Kai Ludwig
    May 12, 2009

    Actually the new FreeSwitch siren14 codec has never been used with SLVoice! Everybody having voicechat with OpenSim is using PCMU without knowing it.

    The current combination of OpenSim+SLVoice+SfreeSwitch does not use the siren14 codec. Instead the communication falls back on using PMCU/8000+L16/8000, as it can be seen when analyzing the traffic.

    SLVoice asks for “SIREN14-3D”, FreeSwitch offers “G7221″. Not matching makes SLVoice fall back to its other choices wich are PCMU/8000 or PCMA/8000. Though this still works it is not giving the high quality that has to be expected by the siren codec. And even worse the PCMU codec has a permanent up- AND downstream of each 90 kps even when not transmitting.

    Still no solution found for this issue … and I dont know if SLVoice is compatible with the G7221 implementation at all.

  4. Erik
    Erik
    Aug 06, 2009

    I’m a region owner not a developer so I’m confused about how to find and install the ‘trunk’ version so I can get FreeSwitch working with the SL Viewer. I’m running the 0.6.3 version of OpenSim in standalone from the binary so I assume I don’t have the FreeSwitch module included in this version. I don’t have the option of enabling voice chat in the estate settings. Can I integrate this ‘trunk’ version into my current install or does it have to be a new install?
    Thanks for any help!

  5. Erik
    Erik
    Aug 07, 2009

    Now I’ve compiled and configured the latest ‘trunk’ version, 0.6.6-release (SVN version 9961), installed and configured Freeswitch as per your tutorial and that on opensimulator.org, and two problems remain. 1) Once Freeswitch and OpenSim servers are running freeswitch throws an error (lots of red) showing that mod_xml_curl can’t locate the api\freeswitch-config at the server’s IP, 2) I still don’t have the option of enabling voice or selecting the private OR estate spatial channel as your screen shows.

  6. Erik
    Erik
    Aug 07, 2009

    I’ve reduced it to one problem. By rolling back to SLViewer 1.22 I could enable the private channel. I still get the Freeswitch error and no voice. Well, and now OpenSim.exe crashes.

  7. Erik
    Erik
    Aug 25, 2009

    Whew, got it. OpenSim compiled release v0.6.5 and SL Viewer 1.23. It’s great, notwithstanding the poor quality of the codec mentioned above. I can bear with that for now.

  8. bryanlvt
    bryanlvt
    Jan 16, 2010

    Hi Erik, I’m having a very similar issue – been through the config exactly as defined in the tutorial and voice is not selectable in the viewer. I am getting an error message in the Freeswitch console as follows:

    “[Warning] sofia_reg.c:1771 cannot find user [xH7FIAbGLSXeQw7JgJ6LMpw==192.168.1.103] You must define a domain called “192.168.1.103″ in your directory and add a user with the “id=xH7FIAbGLSXeQw7JgJ6LMpw==” attribute and you must configure your device to use the proper domain in its authentication credentials”

    I am stuck. Can you or anyone else help? All appreciated. Thanks. Lee

  9. Lloyd
    Lloyd
    Jan 22, 2010

    This is a worthless tutorial. Video quality so bad it’s hard to determine what’s going on.

  10. Myron Curtis
    Myron Curtis
    Feb 24, 2010

    It has taken me several weeks to make this work, and it still isn’t perfect because not all my servers have voice. Still progress is good.
    The two issues I had were:
    1. The regular binaries (release that you can just download and install) didn’t contain the necessary modules. So, I had to compile the source code using visual studios c== express.
    2. TCP/UDP ports 5060, 5061, 5080, 5081, 50505, 64738 all need to be opened on the router (port forwarding).
    Once that was done, the instructions on the wiki worked.

  11. Myron Curtis
    Myron Curtis
    Feb 24, 2010

    oops that should be C++

  12. Myron Curtis
    Myron Curtis
    May 19, 2010

    Well it is working, but only on my local network. It is not working for residents logging in from the internet. So, now I am looking at the router’s port forwarding settings, the IP configurations in FREESwitch, and those in Opensim’s .ini. Everything looks right, but voice is still only local. Do any of you have an idea on what I should check next?

  13. [...] Update: The content of this post is outdated. To learn more about the new FreeSWITCH connector in OpenSim, go to FreeSWITCH module in OpenSim [...]

Leave a Reply

Spam Protection by WP-SpamFree

Photos on flickr