How to install FreeSWITCH for OpenSim
Inhaltsverzeichnis |
How to install FreeSWITCH for OpenSim
(example for Debian Linux 5.0 Lenny)
Prerequisites
apt-get update apt-get upgrade apt-get install build-essential subversion subversion-tools \ automake1.9 gcc-4.1 autoconf make wget libtool g++ \ libncurses5 libncurses5-dev libgdbm-dev libdb-dev \ libperl-dev zlib1g-dev apt-get install git-core
Fetch FreeSWITCH from git, configure source and compile
cd /usr/src git clone git://git.freeswitch.org/freeswitch.git
Edit file /usr/src/freeswitch/conf/autoload_configs/modules.conf.xml and uncomment the mod_xml_curl module:
Change
<!-- <load module="mod_xml_curl"/> -->
to
<load module="mod_xml_curl"/>
cd /usr/src/freeswitch ./bootstrap.sh
In case there is a complaint that you haven't the right autoconf version installed, try to point bootstrap.sh to the higher version of autoconf which is mostly installed on your debian system, too:
AUTOCONF=/usr/bin/autoconf2.50 ./bootstrap.sh
./configure make all make install make cd-sounds-install make cd-moh-install
FreeSWITCH configuration for OpenSim
vim /usr/local/freeswitch/conf/autoload_configs/xml_curl.conf.xml
For connecting opensim server software versions 0.6.9, 0.7.0.1 and 0.7.0.2 the xml_curl module must be configured as follows:
<configuration name="xml_curl.conf" description="cURL XML Gateway">
<bindings>
<binding name="example">
<param name="gateway-url" value="http://youropensimregionip:9000/api/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://youropensimregionip:9000/api/freeswitch-config" bindings="dialplan"/>
<param name="gateway-credentials" value="freeswitch:password"/>
<param name="disable-100-continue" value="true"/>
</binding>
</bindings>
</configuration>
Starting with opensim server software version 0.7.1 dev the following gateways urls should be used in xml_curl.conf.xml for grid mode
(simulator instance connects to freeswitch using ROBUST service):
<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>
- 78.46.22.11 is the IP of the current Annuna Grid ROBUST service
- for standalone mode the freeswitch gateway url should still point to port 9000 (or whatever is configured in your OpenSim.ini)
The /usr/local/freeswitch/conf/vars.xml requires modification to enable the siren14 codec. Search within vars.xml for the global_codec_prefs and change the line to read: (often it already is configured this way)
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=G7221@32000h,G7221@16000h,G722,PCMU,PCMA,GSM"/>
By default, FreeSWITCH plays hold music when there is only one avatar in the conference and beeps for everyone when avatars arrive and leave. To disable, edit /usr/local/freeswitch/conf/autoload_configs/conference.conf.xml. Locate the "default" profile and comment out the following lines as shown below:
vim /usr/local/freeswitch/conf/autoload_configs/conference.conf.xml
[...]
<!-- File to play if you are alone in the conference -->
<!-- <param name="alone-sound" value="conference/conf-alone.wav"/> -->
[...]
<!-- File to play when you're alone (music on hold)-->
<!-- <param name="moh-sound" value="$${hold_music}"/> -->
<!-- File to play when you join the conference -->
<!-- <param name="enter-sound" value="tone_stream://%(200,0,500,600,700)"/> [^] -->
<!-- File to play when you leave the conference -->
<!-- <param name="exit-sound" value="tone_stream://%(500,0,300,200,100,50,25)"/> [^] -->
<!-- File to play when you ae ejected from the conference -->
<!-- <param name="kicked-sound" value="conference/conf-kicked.wav"/> -->
[...]
Configuration of OpenSim to use FreeSWITCH for online voice communication
Now, last not least, your OpenSim.ini must be updated in order to connect to FreeSWITCH:
cd <path-to-your-opensim-bin-dir> vim OpenSim.ini
[FreeSwitchVoice] enabled = true ; FreeSwitch server is going to contact us and ask us all sorts of things. freeswitch_server_user = freeswitch freeswitch_server_pass = password freeswitch_api_prefix = /api ; IP address of an opensim region with voice enabled freeswitch_service_server = youropensimregionip ; the port your Opensim region is running on freeswitch_service_port = 9000 ; your freeswitch IP address freeswitch_realm = yourfreeswitchserverip freeswitch_sip_proxy = yourfreeswitchserverip:5060 ; STUN = Simple Traversal of UDP through NATs ; See http://wiki.freeswitch.org/wiki/NAT_Traversal freeswitch_attempt_stun = false freeswitch_stun_server = stun.freeswitch.org ; Echo server MAY not used but information MAY be ; required to relay to Freeswitch server (TBC?) freeswitch_echo_server = yourfreeswitchserverip freeswitch_echo_port = 50505 freeswitch_well_known_ip = yourfreeswitchserverip freeswitch_default_timeout = 5000 freeswitch_subscribe_retry = 120 ; freeswitch_password_reset_url = ; opensim_well_known_http_address = youropensimregionip ; CHECK THIS... should be Address_Of_Your_SIM_HTTP_Server_Hostname_Allowed
Start order for OpenSim with FreeSWITCH
Please make sure that you always have FreeSWITCH already running when starting up your OpenSim because it needs a running FreeSWITCH server to connect to.
The message auth failure often says that you have a configuration issue. Please make sure to use the IP address in all configuration files and NOT the node name.
| Wer gerade hier ist: Benutzer 0 Gäste 0 Bots 1 |