Project

General

Profile

OpenBSC with Asterisk » History » Version 24

duo_kali, 01/05/2018 05:39 PM

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