Project

General

Profile

OpenBSC with Asterisk » History » Version 15

duo_kali, 12/20/2017 04:18 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
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
sudo apt install libpcsclite-dev libtalloc-dev libortp-dev libsctp-dev libmnl-dev libdbi-dev libdbd-sqlite3 libsqlite3-dev sqlite3 libc-ares-dev 
122 1 manatails
123
124 12 duo_kali
cd osmo
125
git clone git://git.osmocom.org/libosmocore
126
cd libosmocore
127
autoreconf -fi
128
./configure
129
make -j5
130
make check
131
sudo make install
132
133
134
cd osmo
135
git clone git://git.osmocom.org/libosmo-abis
136
cd libosmo-abis
137
autoreconf -fi
138
./configure
139
make -j5
140
make check
141
sudo make install
142
143
144
cd osmo
145
git clone git://git.osmocom.org/libosmo-netif
146
cd libosmo-netif
147
autoreconf -fi
148
./configure
149
make -j5
150
make check
151
sudo make install
152
153
154
cd osmo
155
git clone git://git.osmocom.org/libosmo-sccp
156
cd libosmo-sccp
157
autoreconf -fi
158
./configure
159
make -j5
160
make check
161
sudo make install
162
163
164
cd osmo
165
git clone git://git.osmocom.org/libsmpp34
166
cd libsmpp34
167
autoreconf -fi
168
./configure
169
make
170
make check
171
sudo make install
172
173
174
cd osmo
175
git clone git://git.osmocom.org/osmo-ggsn
176
cd osmo-ggsn
177
autoreconf -fi
178
./configure
179
make -j5
180
make check
181
sudo make install
182
183
184
cd osmo
185
git clone git://git.osmocom.org/openbsc
186
cd openbsc/openbsc
187
autoreconf -fi
188
./configure --enable-smpp --enable-osmo-bsc --enable-nat
189
make -j5
190
make check
191
sudo make install $$ sudo ldconfig
192
193
cd osmo
194
git clone git://git.osmocom.org/osmo-bts.git
195
cd osmo-bts
196
autoreconf -fi
197
./configure --enable-trx
198
make
199
make check
200
sudo make install
201
202
203
204
205
** NOW INSTALLING “OSMO-SIP-CONNECTOR”
206 1 manatails
207 14 duo_kali
* Install dependencies:
208 12 duo_kali
209
The extension we are about to make requires to install some additional packages.
210
sudo apt-get install libsofia-sip-ua-glib-dev
211
sudo apt-get install asterisk
212
213
**Install osmo-sip-connector:
214
cd osmo
215
git clone git://git.osmocom.org/osmo-sip-connector.git
216
cd osmo-sip-connector
217
autoreconf -fi
218
./configure
219
make
220
sudo make install $$ sudo ldconfig
221
222
setting path for configuration
223
224
gedit ~/osmo/openbsc.cfg (file attached)
225
gedit ~/osmo/osmo-bts.cfg (file attached)
226
gedit ~/osmo/osmo-sip-connector.cfg (file attached)
227
228
229
**Asterisk configuration
230
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.
231
Set up the sip-trunk towards osmo-sip-connector:
232
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:
233
234
cd /etc/asterisk/
235
sudo gedit sip.conf
236
237
238
[GSM]
239
type=friend
240
host=127.0.0.1
241
dtmfmode=rfc2833
242
canreinvite=no
243
disallow=all
244
allow=gsm
245
context=gsmsubscriber
246
port=5069
247
248
249
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. 
250
Set up a dialplan to route calls:
251
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:
252
253
cd /etc/asterisk
254
sudo gedit extensions.conf
255
256
[gsmsubscriber]
257
exten=>_XXXXX,1,Dial(SIP/GSM/${EXTEN})
258
exten=>_XXXXX,n,HangUp
259
260
NOW HOW TO RUN :
261
262
** open terminal 
263
264
run:
265
osmo-nitb -c ~/osmo/openbsc.cfg -l ~/osmo/hlr.sqlite3 -P -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM -M /tmp/bsc_mncc
266
267
268
open new terminal
269
run:
270
osmo-bts-trx -c ~/osmo/osmo-bts.cfg
271
272
273
open new terminal
274
run:
275
osmo-sip-connector -c ./osmo/osmo-sip-connector.cfg
276
277
278
open new terminal
279
run:
280
sudo asterisk -r
281
282
283
open new terminal
284
run:
285
osmo-trx -c 1 -s 4 -e -l INFO
286
287
open new terminal
288
run:
289
telnet localhost 4242
290
enable
291
292
Now you running OpenBSC/BTS with Asterisk :-)
Add picture from clipboard (Maximum size: 48.8 MB)