Project

General

Profile

OpenBSC with Asterisk » History » Version 12

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