Project

General

Profile

OpenBSC with Asterisk » History » Revision 21

Revision 20 (duo_kali, 01/01/2018 04:29 PM) → Revision 21/74 (duo_kali, 01/01/2018 04:37 PM)

    *LimeSDR BUILD OpenBSC with ASTERISK (Ubuntu 16.04)* 


 ** Install Dependency 

 <pre> 
 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 

 ** Install LimeSuite 

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

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

 Type “LimeSuiteGUI” on terminal to check GUI is running 

 Now 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 


 ** 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:  
   git checkout release_003_010_002_000 (get the latest is if fine) 

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

 export LD_LIBRARY_PATH=/usr/local/lib 



 ** Install SoapySDR and SoapyUHD  


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

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


 ----try run command to find LimeSDR : 

 uhd_find_devices 


 next.... 

 ** NOW BUILD OSMO-TRX 


 mkdir osmo 
 cd osmo 

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


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

 osmo-trx 


 next ….. 


 ** OSMOCOM OpenBSC building with all stacks  

 DEPENDENCY 
 sudo apt install libpcsclite-dev libtalloc-dev libortp-dev libsctp-dev libmnl-dev libdbi-dev libdbd-sqlite3 libsqlite3-dev sqlite3 libc-ares-dev  


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


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


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


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


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


 cd osmo 
 git clone git://git.osmocom.org/osmo-ggsn 
 cd osmo-ggsn 
 autoreconf -fi 
 ./configure 
 make -j5 
 make check 
 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 
 make check 
 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 
 make check 
 sudo make install 




 ** NOW INSTALLING “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 
 sudo apt-get install asterisk 

 **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) 


 **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 

 NOW HOW TO RUN : 

 ** 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 -c 1 -s 4 -e -l INFO 

 open new terminal 
 run: 
 telnet localhost 4242 
 enable 

 Now you running OpenBSC/BTS with Asterisk :-) 
Add picture from clipboard (Maximum size: 48.8 MB)