Project

General

Profile

OpenBSC with Asterisk » History » Version 13

duo_kali, 12/20/2017 04:04 AM

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