Project

General

Profile

OpenBSC with Asterisk » History » Version 53

« Previous - Version 53/66 (diff) - Next » - Current version
duo_kali, 09/04/2018 02:57 AM


DISCLAIMER

This page is user-contributed information, and not official documentation by the Osmocom project. It might be outdated or inaccurate.
Please help by improving this document, or reporting any issues to the relevant mailing list.

How to install OpenBSC with Asterisk using LimeSDR (Ubuntu 16.04)

Build LimeSDR software and dependency

  • Install Dependency

sudo add-apt-repository -y ppa:myriadrf/drivers
sudo apt-get update

-install core library and build dependencies
sudo apt-get install git g++ cmake libsqlite3-dev

-install hardware support dependencies
sudo apt-get install libsoapysdr-dev libi2c-dev libusb-1.0-0-dev

-install graphics dependencies
sudo apt-get install libwxgtk3.0-dev freeglut3-dev gnuplot

#Install LimeSuite

git clone https://github.com/myriadrf/LimeSuite.git
cd LimeSuite
mkdir buildir && cd buildir
cmake ../
make -j4
sudo make install
sudo ldconfig

cd LimeSuite/udev-rules
sudo sh ./install.sh

Type “LimeSuiteGUI” on terminal to check GUI is running

Build UHD driver and SoapySDR, SoapyUHD

MAKE SURE YOU HAVE A FRESH INSTALL OR DO THIS TO REMOVE ALL UHD DRIVER FROM APT**
sudo apt-get remove libuhd-dev libuhd003 uhd-host

#Then we start compile UHD driver (install all dependency)

sudo apt-get -y install git swig cmake doxygen build-essential libboost-all-dev libtool libusb-1.0-0 libusb-1.0-0-dev libudev-dev libncurses5-dev libfftw3-bin libfftw3-dev libfftw3-doc libcppunit-1.13-0v5 libcppunit-dev libcppunit-doc ncurses-bin cpufrequtils python-numpy python-numpy-doc python-numpy-dbg python-scipy python-docutils qt4-bin-dbg qt4-default qt4-doc libqt4-dev libqt4-dev-bin python-qt4 python-qt4-dbg python-qt4-dev python-qt4-doc python-qt4-doc libqwt6abi1 libfftw3-bin libfftw3-dev libfftw3-doc ncurses-bin libncurses5 libncurses5-dev libncurses5-dbg libfontconfig1-dev libxrender-dev libpulse-dev swig g++ automake autoconf libtool python-dev libfftw3-dev libcppunit-dev libboost-all-dev libusb-dev libusb-1.0-0-dev fort77 libsdl1.2-dev python-wxgtk3.0 git-core libqt4-dev python-numpy ccache python-opengl libgsl-dev python-cheetah python-mako python-lxml doxygen qt4-default qt4-dev-tools libusb-1.0-0-dev libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools python-qwt5-qt4 cmake git-core wget libxi-dev gtk2-engines-pixbuf r-base-dev python-tk liborc-0.4-0 liborc-0.4-dev libasound2-dev python-gtk2 libzmq-dev libzmq1 python-requests python-sphinx libcomedi-dev python-zmq python3-dbg libgps-dev python3-dev python3-pip python3-tk python3-lxml python3-six

#Install UHD

git clone https://github.com/EttusResearch/uhd
cd uhd
git tag -l
...
release_003_009_004
release_003_009_005
release_003_010_000_000

- Example: For UHD 3.10.2.0:
then type this command :

git checkout release_003_010_002_000 (get the latest is fine)

then build:

cd host
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig

export LD_LIBRARY_PATH=/usr/local/lib

----now find UHD:

uhd_find_devices

#Install SoapySDR and SoapyUHD

git clone https://github.com/pothosware/SoapySDR.git
cd SoapySDR
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

git clone https://github.com/pothosware/SoapyUHD
cd SoapyUHD
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

---try run command to find LimeSDR :

SoapySDRUtil --find

next....

Build osmo-trx

mkdir osmo
cd osmo

git clone https://github.com/osmocom/osmo-trx
cd osmo-trx
autoreconf -fi
./configure --with-lms
make -j5
make check
sudo make install
sudo ldconfig

run on terminal: (too see its connect with SoapyUHD and UHD)

osmo-trx-lms

next …..

Build Osmocom OpenBSC with all stacks

DEPENDENCY (use synaptic when they ask more dependency when build)
sudo apt install libpcsclite-dev libtalloc-dev libortp-dev libsctp-dev libmnl-dev libdbi-dev libdbd-sqlite3 libsqlite3-dev sqlite3 libc-ares-dev libxml2-dev libssl-dev 

cd osmo
git clone git://git.osmocom.org/libosmocore
cd libosmocore
autoreconf -fi
./configure
make -j5
sudo make install

cd osmo
git clone git://git.osmocom.org/libosmo-abis
cd libosmo-abis
autoreconf -fi
./configure
make -j5
sudo make install

cd osmo
git clone git://git.osmocom.org/libosmo-netif
cd libosmo-netif
autoreconf -fi
./configure
make -j5
sudo make install

cd osmo
git clone git://git.osmocom.org/libosmo-sccp
cd libosmo-sccp
autoreconf -fi
./configure
make -j5
sudo make install

cd osmo
git clone git://git.osmocom.org/libsmpp34
cd libsmpp34
autoreconf -fi
./configure
make
sudo make install

cd osmo
git clone git://git.osmocom.org/osmo-ggsn
cd osmo-ggsn
autoreconf -fi
./configure
make -j5
sudo make install

cd osmo
git clone git://git.osmocom.org/openbsc
cd openbsc/openbsc
autoreconf -fi
./configure --enable-smpp --enable-osmo-bsc --enable-nat
make -j5
sudo make install $$ sudo ldconfig

cd osmo
git clone git://git.osmocom.org/osmo-bts.git
cd osmo-bts
autoreconf -fi
./configure --enable-trx
make
sudo make install
sudo ldconfig

Build asterisk & osmo-sip-connector

--Install dependencies:

The extension we are about to make requires to install some additional packages.
sudo apt-get install libsofia-sip-ua-glib-dev

#Install osmo-sip-connector

cd osmo
git clone git://git.osmocom.org/osmo-sip-connector.git
cd osmo-sip-connector
autoreconf -fi
./configure
make
sudo make install $$ sudo ldconfig

setting path for configuration

gedit ~/osmo/openbsc.cfg (file attached)
gedit ~/osmo/osmo-bts.cfg (file attached)
gedit ~/osmo/osmo-sip-connector.cfg (file attached)

#Install Asterisk

git clone -b 11 http://gerrit.asterisk.org/asterisk asterisk-11
cd asterisk-11
./configure
make
sudo make install

--Asterisk configuration
The following section will discuss a minimal Asterisk configuration that is able to route calls between mobile phones. The described case assumes a freshly installed Asterisk with virgin configuration files. In the following we will edit extensions.conf and sip.conf which can be found in the /etc/asterisk directory. The example below is not special to GSM, its rather a normal SIP-trunk configuration.
Set up the sip-trunk towards osmo-sip-connector:
The first that has to be taken care of is the connection to osmo-sip-connector. The following lines need be appended to sip.conf:

cd /etc/asterisk/
sudo gedit sip.conf

[GSM]
type=friend
host=127.0.0.1
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=gsm
context=gsmsubscriber
port=5069

noted : (changing port with 5062 or 5060 if 5069 not working)

The connection is named GSM, this name will be used later to reference the connection when routing outgoing calls. The context name “gsmsubscriber” references the context where mobile originated calls are routed into the dialplan.
Set up a dialplan to route calls:
Now Asterisk and osmo-sip-connector are connected. The following example introduces a very basic dialplan configuration to route calls between mobile phones. The following example can be added to extensions.conf:

cd /etc/asterisk
sudo gedit extensions.conf

[gsmsubscriber]
exten=>_XXXXX,1,Dial(SIP/GSM/${EXTEN})
exten=>_XXXXX,n,HangUp

how to run OpenBSC stacks

** open terminal 

run:
osmo-nitb -c ~/osmo/openbsc.cfg -l ~/osmo/hlr.sqlite3 -P -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM -M /tmp/bsc_mncc

open new terminal
run:
osmo-bts-trx -c ~/osmo/osmo-bts.cfg

open new terminal
run:
osmo-sip-connector -c ~/osmo/osmo-sip-connector.cfg

open new terminal
run:
sudo asterisk -r

open new terminal
run:
osmo-trx-lms -C ~/osmo/limesdr.cfg
or
osmo-trx-uhd -C ~/osmo/limesdr.cfg (if using usrp or other hardware used UHD)

open new terminal
run:
telnet localhost 4242
enable

Now you running OpenBSC with Asterisk :-)

Add picture from clipboard (Maximum size: 48.8 MB)