Project

General

Profile

OpenBSC with Asterisk » History » Version 30

duo_kali, 06/07/2018 08:45 AM

1 15 duo_kali
  *LimeSDR BUILD OpenBSC with ASTERISK (Ubuntu 16.04)*
2 1 manatails
3
4 12 duo_kali
** Install Dependency
5 2 manatails
6 12 duo_kali
<pre>
7
sudo add-apt-repository -y ppa:myriadrf/drivers
8
sudo apt-get update
9 1 manatails
10 12 duo_kali
#install core library and build dependencies
11
sudo apt-get install git g++ cmake libsqlite3-dev
12 1 manatails
13 12 duo_kali
#install hardware support dependencies
14
sudo apt-get install libsoapysdr-dev libi2c-dev libusb-1.0-0-dev
15 1 manatails
16 12 duo_kali
#install graphics dependencies
17 26 duo_kali
sudo apt-get install libwxgtk3.0-dev freeglut3-dev gnuplot
18 1 manatails
19 12 duo_kali
** Install LimeSuite
20 1 manatails
21 12 duo_kali
git clone https://github.com/myriadrf/LimeSuite.git
22
cd LimeSuite
23
mkdir builddir && cd builddir
24 29 duo_kali
git checkout v17.12.0
25 12 duo_kali
cmake ../
26
make -j4
27
sudo make install
28
sudo ldconfig
29 1 manatails
30 12 duo_kali
cd LimeSuite/udev-rules
31 27 duo_kali
sudo sh ./install.sh
32 1 manatails
33 12 duo_kali
Type “LimeSuiteGUI” on terminal to check GUI is running
34
35 16 duo_kali
Now build UHD driver and SoapySDR, SoapyUHD
36 12 duo_kali
37 13 duo_kali
*****MAKE SURE YOU HAVE A FRESH INSTALL OR DO THIS TO REMOVE ALL UHD DRIVER FROM APT*****
38
sudo apt-get remove libuhd-dev libuhd003 uhd-host
39
40
#Then we start compile UHD driver (install all dependency)
41 12 duo_kali
42 25 duo_kali
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
43 12 duo_kali
44
45
** Install UHD
46
git clone https://github.com/EttusResearch/uhd
47
cd uhd
48
git tag -l
49
...
50
release_003_009_004
51
release_003_009_005
52
release_003_010_000_000
53
54
# Example: For UHD 3.10.2.0: 
55 21 duo_kali
  git checkout release_003_010_002_000 (get the latest is fine)
56 12 duo_kali
57
cd host
58
mkdir build
59
cd build 
60
cmake ../
61 1 manatails
make
62
sudo make install
63 12 duo_kali
sudo ldconfig
64 1 manatails
65 12 duo_kali
export LD_LIBRARY_PATH=/usr/local/lib
66 1 manatails
67 30 duo_kali
----now find UHD:
68 1 manatails
69 30 duo_kali
uhd_find_devices
70 1 manatails
71 30 duo_kali
72
73 12 duo_kali
** Install SoapySDR and SoapyUHD 
74 1 manatails
75
76 12 duo_kali
git clone https://github.com/pothosware/SoapySDR.git
77
cd SoapySDR
78 24 duo_kali
mkdir build
79 12 duo_kali
cd build
80
cmake ..
81
make
82
sudo make install
83
sudo ldconfig
84 1 manatails
85 12 duo_kali
git clone https://github.com/pothosware/SoapyUHD
86
cd SoapyUHD
87 24 duo_kali
mkdir build
88 12 duo_kali
cd build
89
cmake ..
90 1 manatails
make
91
sudo make install
92
sudo ldconfig
93 19 duo_kali
94
95
----try run command to find LimeSDR :
96 1 manatails
97 30 duo_kali
SoapySDRUtil --find
98 1 manatails
99 19 duo_kali
next....
100 30 duo_kali
101 1 manatails
102 12 duo_kali
** NOW BUILD OSMO-TRX
103 1 manatails
104
105 12 duo_kali
mkdir osmo
106
cd osmo
107 1 manatails
108 12 duo_kali
git clone https://github.com/osmocom/osmo-trx.git
109
cd osmo-trx
110
autoreconf -fi
111
./configure
112
make -j5
113
make check
114
sudo make install
115
sudo ldconfig
116 1 manatails
117
118 12 duo_kali
run on terminal: (too see its connect with SoapyUHD and UHD)
119 1 manatails
120 28 duo_kali
osmo-trx-uhd
121 1 manatails
122
123 12 duo_kali
next …..
124 1 manatails
125
126 12 duo_kali
** OSMOCOM OpenBSC building with all stacks 
127 1 manatails
128 22 duo_kali
DEPENDENCY (use synaptic when they ask more dependency when build)
129 12 duo_kali
sudo apt install libpcsclite-dev libtalloc-dev libortp-dev libsctp-dev libmnl-dev libdbi-dev libdbd-sqlite3 libsqlite3-dev sqlite3 libc-ares-dev 
130 1 manatails
131
132 12 duo_kali
cd osmo
133
git clone git://git.osmocom.org/libosmocore
134
cd libosmocore
135
autoreconf -fi
136
./configure
137
make -j5
138
make check
139
sudo make install
140
141
142
cd osmo
143
git clone git://git.osmocom.org/libosmo-abis
144
cd libosmo-abis
145
autoreconf -fi
146
./configure
147
make -j5
148
make check
149
sudo make install
150
151
152
cd osmo
153
git clone git://git.osmocom.org/libosmo-netif
154
cd libosmo-netif
155
autoreconf -fi
156
./configure
157
make -j5
158
make check
159
sudo make install
160
161
162
cd osmo
163
git clone git://git.osmocom.org/libosmo-sccp
164
cd libosmo-sccp
165
autoreconf -fi
166
./configure
167
make -j5
168
make check
169
sudo make install
170
171
172
cd osmo
173
git clone git://git.osmocom.org/libsmpp34
174
cd libsmpp34
175
autoreconf -fi
176
./configure
177
make
178
make check
179
sudo make install
180
181
182
cd osmo
183
git clone git://git.osmocom.org/osmo-ggsn
184
cd osmo-ggsn
185
autoreconf -fi
186
./configure
187
make -j5
188
make check
189
sudo make install
190
191
192
cd osmo
193
git clone git://git.osmocom.org/openbsc
194
cd openbsc/openbsc
195
autoreconf -fi
196
./configure --enable-smpp --enable-osmo-bsc --enable-nat
197
make -j5
198
make check
199
sudo make install $$ sudo ldconfig
200
201
cd osmo
202
git clone git://git.osmocom.org/osmo-bts.git
203
cd osmo-bts
204
autoreconf -fi
205
./configure --enable-trx
206
make
207
make check
208 1 manatails
sudo make install
209 22 duo_kali
sudo ldconfig
210 12 duo_kali
211
212
213
214 17 duo_kali
** NOW INSTALLING “ASTERISK & OSMO-SIP-CONNECTOR”
215 1 manatails
216 14 duo_kali
* Install dependencies:
217 12 duo_kali
218
The extension we are about to make requires to install some additional packages.
219
sudo apt-get install libsofia-sip-ua-glib-dev
220
sudo apt-get install asterisk
221
222
**Install osmo-sip-connector:
223
cd osmo
224
git clone git://git.osmocom.org/osmo-sip-connector.git
225
cd osmo-sip-connector
226
autoreconf -fi
227
./configure
228
make
229
sudo make install $$ sudo ldconfig
230
231
setting path for configuration
232
233
gedit ~/osmo/openbsc.cfg (file attached)
234
gedit ~/osmo/osmo-bts.cfg (file attached)
235
gedit ~/osmo/osmo-sip-connector.cfg (file attached)
236
237
238
**Asterisk configuration
239
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.
240
Set up the sip-trunk towards osmo-sip-connector:
241
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:
242
243
cd /etc/asterisk/
244
sudo gedit sip.conf
245
246
247
[GSM]
248
type=friend
249
host=127.0.0.1
250
dtmfmode=rfc2833
251
canreinvite=no
252
disallow=all
253
allow=gsm
254
context=gsmsubscriber
255 18 duo_kali
port=5069   
256
257
noted : (changing port with 5062 or 5060 if 5069 not working)
258 12 duo_kali
259
260
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. 
261
Set up a dialplan to route calls:
262
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:
263
264
cd /etc/asterisk
265
sudo gedit extensions.conf
266
267
[gsmsubscriber]
268
exten=>_XXXXX,1,Dial(SIP/GSM/${EXTEN})
269
exten=>_XXXXX,n,HangUp
270
271
NOW HOW TO RUN :
272
273
** open terminal 
274
275
run:
276
osmo-nitb -c ~/osmo/openbsc.cfg -l ~/osmo/hlr.sqlite3 -P -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM -M /tmp/bsc_mncc
277
278
279
open new terminal
280
run:
281
osmo-bts-trx -c ~/osmo/osmo-bts.cfg
282
283
284
open new terminal
285
run:
286 23 duo_kali
osmo-sip-connector -c ~/osmo/osmo-sip-connector.cfg
287 12 duo_kali
288
289
open new terminal
290
run:
291
sudo asterisk -r
292
293
294
open new terminal
295
run:
296 28 duo_kali
osmo-trx-uhd -C ~/osmo/limesdr.cfg
297 12 duo_kali
298
open new terminal
299
run:
300
telnet localhost 4242
301
enable
302
303 28 duo_kali
Now you running OpenBSC with Asterisk :-)
Add picture from clipboard (Maximum size: 48.8 MB)