Difference between revisions of "OpenBTS: FreeSWITCH"

From OnnoWiki
Jump to navigation Jump to search
(New page: Sumber: https://wush.net/trac/rangepublic/wiki/DebOpenBTS Note the Package System Only Works on Ubuntu 12.04 running on x86-64 architecture The packages can be obtained from http://vmp...)
 
Line 212: Line 212:
  
 
* https://wush.net/trac/rangepublic/wiki/DebOpenBTS
 
* https://wush.net/trac/rangepublic/wiki/DebOpenBTS
 +
* http://vmphone2.cs.berkeley.edu/all_packages/

Revision as of 05:08, 1 January 2014

Sumber: https://wush.net/trac/rangepublic/wiki/DebOpenBTS


Note the Package System Only Works on Ubuntu 12.04 running on x86-64 architecture

The packages can be obtained from http://vmphone2.cs.berkeley.edu/all_packages/. Required Libraries/Utilities

To fulfill various package dependencies of OpenBTS (minus the PBX) you'll need the following packages:

   autoconf
   libtool
   libosip2
   libortp
   libusb-1.0
   g++
   sqlite3
   libsqlite3-dev (sipauthserve only)
   libreadline6-dev
   libncurses5-dev

These can be installed (on a Debian-flavored unix distro) with the following command:

sudo apt-get install autoconf libtool libosip2-dev libortp-dev libusb-1.0-0-dev g++ sqlite3 libsqlite3-dev erlang libreadline6-dev libncurses5-dev

System Diagram

In this diagram, Black links are network connections (SIP). Red links are file system connections (sqlite3 lookups). Blue links are ODBC (network/local DB lookups).

Install OpenBTS, Smqueue, Sipauthserve and the Transceiver All Other Devices (except for USRP1)

All UHD devices from Ettus Research - with the exception of the USRP1 - use the UHD (Universal Hardware Driver) with OpenBTS. In addition, the UmTRX from Fairwaves uses a its own UHD driver, which is API compatible.

UHD devices include the following:

   Ettus Research
       B-Series: B100, B200, B210
       N-Series: N200, N210, USRP2 
   Fairwaves
       UmTRX 

Instructions to install UHD can be found here. Recently released B200 and B210 devices currently require building UHD from the master branch. Released binary versions of UHD are suitable for other devices.

Information on UmTRX and the Fairwaves UHD driver is available here.

To verify proper driver installation, run the uhd_usrp_probe utility installed with the UHD driver. Output should be similar to the following truncated output. Also, to facilitate of FPGA loading times, it is suggested that the uhd_usrp_probe be run at least once after powering on the device and before starting OpenBTS.

$ uhd_usrp_probe

linux; GNU C++ version 4.8.1 20130603 (Red Hat 4.8.1-1); Boost_105300; UHD_003.005.004-140-gfb32ed16

-- Opening a USRP2/N-Series device... -- Current recv frame size: 1472 bytes -- Current send frame size: 1472 bytes

 _____________________________________________________
/

| Device: USRP2 / N-Series Device | _____________________________________________________ | / | | Mboard: USRP2 r4 | | hardware: 1024 | | mac-addr: 00:50:c2:85:36:1e | | ip-addr: 255.255.255.255 | | subnet: 255.255.255.255 | | gateway: 255.255.255.255 | | gpsdo: none | | serial: 1566 | | FW Version: 12.4 | | FPGA Version: 10.1

Install Stage

The following packages are necessary to continue, (be forewarned they were built for Ubuntu 12.04 x86-64 system). Also this version of openbts was built for uhd devices:

   openbts-public_3.2_amd64.deb smqueue-public_3.2_amd64.deb sipauthserve-public_3.2_amd64.deb a53_1.0-1_amd64.deb

Install the packages in the following order, (if any dependencies pop-up install them as well):

sudo dpkg -i a53_1.0-1_amd64.deb sudo dpkg -i openbts-public_3.2_amd64.deb sudo dpkg -i smqueue-public_3.2_amd64.deb sudo dpkg -i sipauthserve-public_3.2_amd64.deb

Running OpenBTS

At this point, we should be able to perform a basic sanity check of OpenBTS.

(from OpenBTS root) cd /OpenBTS sudo ./OpenBTS

You should see output like this:

system ready use the OpenBTSCLI utility to access CLI

And if you scan for GSM towers on your phone, you should see a 00101 (test) network. If you try to attach, it will reject you. This is because OpenBTS, by default, only allows registered handsets to connect. As we are not running our registration server (sipauthserve) no phones will camp. From here, we should look at a few OpenBTS configuration variables. Connect to OpenBTS with the OpenBTSCLI command:

(from OpenBTS root) cd /OpenBTS sudo ./OpenBTSCLI

and then, in the CLI

config

You will see a lot of stock configuration options. You can find these listed here. Most of these only need to be tweaked if you are moving beyond a simple desktop setup. However, a few are required for basic operation. These are:

   GSM.Radio.Band - Set this to the GSM band appropriate for your hardware.
   GSM.Radio.C0 - This is the  ARFCN. Set it to something appropriate for your band.
   Control.LUR.OpenRegistration - Set this to a  regular expression matching the IMSIs of your test phones. This tells OpenBTS to not reject your handset just because your registration server (below) isn't responding. Useful for debugging and initializing the system. 

The values can be modified from OpenBTSCLI with the config command. For example,

config Control.LUR.OpenRegistration .*

to allow registrations from any phone regardless of their provider. Caution: With this config all phones have access, without any restriction. When an antenna is attached, at least your neighbors will connect, so do not try this at home :-)

If these steps are complete, you have a working BTS. If they do not, check out the common errors. Running sipauthserve

Running sipauthserve will provide you with a registration server. To do so:

cd /OpenBTS sudo ./sipauthserve

sipauthserve does not have a CLI, so you'll only see a small output:

ALERT 139639310980928 sipauthserve.cpp:214:main: ./sipauthserve (re)starting

Remember, if you change any of the config variables, you'll need to restart sipauthserve for the changes to take effect. Running Smqueue

Smqueue is run with the following command:

(from the smqueue directory) cd /OpenBTS sudo ./smqueue

Smqueue does not have a command-line interface, instead just reading configuration values and processing messages. So you'll only see a small output:

ALERT 140545832068928 smqueue.cpp:2421:main: smqueue (re)starting smqueue logs to syslogd facility LOCAL7, so there's not much to see here

Remember, if you change any of the variables, you'll need to restart smqueue for the changes to take effect. Installing the PBX Freeswitch

FreeSwitch is an up-and-coming Asterisk competitor. Its interoperation with OpenBTS is supported primarily by the group at Berkeley. It provides programmatic voice and text routing, as well as a more flexible programming environment for voice/sms applications at the cost of being buggier and having less support. Install Stage

Perform the following operations:

tar -zxvf freeswitch_vanilla.tar.gz tar -zxvf freeswitch_all.tar.gz cd freeswitch_vanilla

Check if you have the all the following packages in the directory freeswitch_vanilla: Depends: freeswitch-meta-vanilla, freeswitch (= 1.2.12y), freeswitch-mod-console (= 1.2.12y), freeswitch-mod-logfile (= 1.2.12y), freeswitch-mod-enum (= 1.2.12y), freeswitch-mod-cdr-csv (= 1.2.12y), freeswitch-mod-event-socket (= 1.2.12y), freeswitch-mod-sofia (= 1.2.12y), freeswitch-mod-loopback (= 1.2.12y), freeswitch-mod-commands (= 1.2.12y), freeswitch-mod-conference (= 1.2.12y), freeswitch-mod-db (= 1.2.12y), freeswitch-mod-dptools (= 1.2.12y), freeswitch-mod-expr (= 1.2.12y), freeswitch-mod-fifo (= 1.2.12y), freeswitch-mod-hash (= 1.2.12y), freeswitch-mod-voicemail (= 1.2.12y), freeswitch-mod-esf (= 1.2.12y), freeswitch-mod-fsv (= 1.2.12y), freeswitch-mod-cluechoo (= 1.2.12y), freeswitch-mod-valet-parking (= 1.2.12y), freeswitch-mod-httapi (= 1.2.12y), freeswitch-mod-dialplan-xml (= 1.2.12y), freeswitch-mod-dialplan-asterisk (= 1.2.12y), freeswitch-mod-spandsp (= 1.2.12y), freeswitch-mod-g723-1 (= 1.2.12y), freeswitch-mod-g729 (= 1.2.12y), freeswitch-mod-amr (= 1.2.12y), freeswitch-mod-speex (= 1.2.12y), freeswitch-mod-h26x (= 1.2.12y), freeswitch-mod-sndfile (= 1.2.12y), freeswitch-mod-native-file (= 1.2.12y), freeswitch-mod-local-stream (= 1.2.12y), freeswitch-mod-tone-stream (= 1.2.12y), freeswitch-mod-lua (= 1.2.12y), freeswitch-mod-say-en (= 1.2.12y), freeswitch-init (= 1.2.12y), freeswitch-lang (= 1.2.12y), freeswitch-music (= 1.2.12y), freeswitch-sounds (= 1.2.12y), freeswitch-conf-vanilla (= 1.2.12y).

Assuming you have all the necessary packages in the directory run, (note these packages were built for Ubuntu 12.04 x86-64 system):

sudo dpkg -i *.deb

If the system complains about unmet dependencies cherry pick install debian packages from freeswitch_all.

Now install two extra dependencies, smspdu and libvbts by running, (note make sure to do this in the following order):

sudo dpkg -i python-smspdu_1.0-1_all.deb sudo dpkg -i python-libvbts_0.0.1-1_all.deb

Configuration Stage

Perform the following operations:

1. In /usr/share/freeswitch/conf/vanilla/dialplan/default.xml change <context name="default"> to <context name="public">.

2.

sudo cp -r /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/

Running Freeswitch and Freeswitch Console

sudo freeswitch sudo fs_cli

Making an Echo Call

Run openbts, openbtscli, smqueue, sipauthserve. In OpenBTSCLI, perform the following operation, substituting address with our inet_address, (which can be found using ifconfig):

 config SIP.Proxy.Speech address:5060
 config SIP.Proxy.SMS address:5060

Make sure your configurations in OpenBTSCLI also allow you to register your phone. Run freeswitch. Connect your phone to the network and call 9196 (echo). If echo works congratulations. Otherwise refer to debugging tips in BuildInstallRun. Attachments

   openbts_system_diagram.png Download (45.2 KB) - added by guest 6 weeks ago



Referensi