Project

General

Profile

OpenBSC with Asterisk » History » Version 29

duo_kali, 06/07/2018 08:43 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
68
69 12 duo_kali
** Install SoapySDR and SoapyUHD 
70 1 manatails
71
72 12 duo_kali
git clone https://github.com/pothosware/SoapySDR.git
73
cd SoapySDR
74 24 duo_kali
mkdir build
75 12 duo_kali
cd build
76
cmake ..
77
make
78
sudo make install
79
sudo ldconfig
80 1 manatails
81 12 duo_kali
git clone https://github.com/pothosware/SoapyUHD
82
cd SoapyUHD
83 24 duo_kali
mkdir build
84 12 duo_kali
cd build
85
cmake ..
86 1 manatails
make
87
sudo make install
88
sudo ldconfig
89 19 duo_kali
90
91
----try run command to find LimeSDR :
92
93
uhd_find_devices
94
95
96 20 duo_kali
next....
97 1 manatails
98 12 duo_kali
** NOW BUILD OSMO-TRX
99 1 manatails
100
101 12 duo_kali
mkdir osmo
102
cd osmo
103 1 manatails
104 12 duo_kali
git clone https://github.com/osmocom/osmo-trx.git
105
cd osmo-trx
106
autoreconf -fi
107
./configure
108
make -j5
109
make check
110
sudo make install
111
sudo ldconfig
112 1 manatails
113
114 12 duo_kali
run on terminal: (too see its connect with SoapyUHD and UHD)
115 1 manatails
116 28 duo_kali
osmo-trx-uhd
117 1 manatails
118
119 12 duo_kali
next …..
120 1 manatails
121
122 12 duo_kali
** OSMOCOM OpenBSC building with all stacks 
123 1 manatails
124 22 duo_kali
DEPENDENCY (use synaptic when they ask more dependency when build)
125 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 
126 1 manatails
127
128 12 duo_kali
cd osmo
129
git clone git://git.osmocom.org/libosmocore
130
cd libosmocore
131
autoreconf -fi
132
./configure
133
make -j5
134
make check
135
sudo make install
136
137
138
cd osmo
139
git clone git://git.osmocom.org/libosmo-abis
140
cd libosmo-abis
141
autoreconf -fi
142
./configure
143
make -j5
144
make check
145
sudo make install
146
147
148
cd osmo
149
git clone git://git.osmocom.org/libosmo-netif
150
cd libosmo-netif
151
autoreconf -fi
152
./configure
153
make -j5
154
make check
155
sudo make install
156
157
158
cd osmo
159
git clone git://git.osmocom.org/libosmo-sccp
160
cd libosmo-sccp
161
autoreconf -fi
162
./configure
163
make -j5
164
make check
165
sudo make install
166
167
168
cd osmo
169
git clone git://git.osmocom.org/libsmpp34
170
cd libsmpp34
171
autoreconf -fi
172
./configure
173
make
174
make check
175
sudo make install
176
177
178
cd osmo
179
git clone git://git.osmocom.org/osmo-ggsn
180
cd osmo-ggsn
181
autoreconf -fi
182
./configure
183
make -j5
184
make check
185
sudo make install
186
187
188
cd osmo
189
git clone git://git.osmocom.org/openbsc
190
cd openbsc/openbsc
191
autoreconf -fi
192
./configure --enable-smpp --enable-osmo-bsc --enable-nat
193
make -j5
194
make check
195
sudo make install $$ sudo ldconfig
196
197
cd osmo
198
git clone git://git.osmocom.org/osmo-bts.git
199
cd osmo-bts
200
autoreconf -fi
201
./configure --enable-trx
202
make
203
make check
204 1 manatails
sudo make install
205 22 duo_kali
sudo ldconfig
206 12 duo_kali
207
208
209
210 17 duo_kali
** NOW INSTALLING “ASTERISK & OSMO-SIP-CONNECTOR”
211 1 manatails
212 14 duo_kali
* Install dependencies:
213 12 duo_kali
214
The extension we are about to make requires to install some additional packages.
215
sudo apt-get install libsofia-sip-ua-glib-dev
216
sudo apt-get install asterisk
217
218
**Install osmo-sip-connector:
219
cd osmo
220
git clone git://git.osmocom.org/osmo-sip-connector.git
221
cd osmo-sip-connector
222
autoreconf -fi
223
./configure
224
make
225
sudo make install $$ sudo ldconfig
226
227
setting path for configuration
228
229
gedit ~/osmo/openbsc.cfg (file attached)
230
gedit ~/osmo/osmo-bts.cfg (file attached)
231
gedit ~/osmo/osmo-sip-connector.cfg (file attached)
232
233
234
**Asterisk configuration
235
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.
236
Set up the sip-trunk towards osmo-sip-connector:
237
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:
238
239
cd /etc/asterisk/
240
sudo gedit sip.conf
241
242
243
[GSM]
244
type=friend
245
host=127.0.0.1
246
dtmfmode=rfc2833
247
canreinvite=no
248
disallow=all
249
allow=gsm
250
context=gsmsubscriber
251 18 duo_kali
port=5069   
252
253
noted : (changing port with 5062 or 5060 if 5069 not working)
254 12 duo_kali
255
256
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. 
257
Set up a dialplan to route calls:
258
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:
259
260
cd /etc/asterisk
261
sudo gedit extensions.conf
262
263
[gsmsubscriber]
264
exten=>_XXXXX,1,Dial(SIP/GSM/${EXTEN})
265
exten=>_XXXXX,n,HangUp
266
267
NOW HOW TO RUN :
268
269
** open terminal 
270
271
run:
272
osmo-nitb -c ~/osmo/openbsc.cfg -l ~/osmo/hlr.sqlite3 -P -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM -M /tmp/bsc_mncc
273
274
275
open new terminal
276
run:
277
osmo-bts-trx -c ~/osmo/osmo-bts.cfg
278
279
280
open new terminal
281
run:
282 23 duo_kali
osmo-sip-connector -c ~/osmo/osmo-sip-connector.cfg
283 12 duo_kali
284
285
open new terminal
286
run:
287
sudo asterisk -r
288
289
290
open new terminal
291
run:
292 28 duo_kali
osmo-trx-uhd -C ~/osmo/limesdr.cfg
293 12 duo_kali
294
open new terminal
295
run:
296
telnet localhost 4242
297
enable
298
299 28 duo_kali
Now you running OpenBSC with Asterisk :-)
Add picture from clipboard (Maximum size: 48.8 MB)