Project

General

Profile

OsmoNITB LCR » History » Version 2

Anonymous, 02/19/2016 10:47 PM

1 1
== Howto OpenBSC with Asterisk and LCR ==
2
3
This is a short walk-through to setup OpenBSC and LCR with Asterisk.
4
5
In the end we'll have a working setup to route calls from our BTS to
6
the PTSN via VoIP.
7
8
9
=== Prerequisites ===
10
 * OpenBSC equipment (BTS, E1 Card)
11
  * We're using a Siemens BS11 microBTS and a Cologne Chips E1 PCI card
12
 * The latest snapshot from the OpenBSC repository
13
   * svn co http://bs11-abis.gnumonks.org/svn/trunk/openbsc
14
   * We've got Revision 513
15
 * LCR from git repository
16
   * git-clone git://git.misdn.org/git/lcr.git/
17
 * A working kernel for your linux system
18
   * Support for your E1 card
19
   * mISDN's l1loop module (mISDN_l1loop.ko)
20
   * You can obtain a working package for Debian at https://brezn.muc.ccc.de/~codec/openbsc/
21
     * Supports cards from Cologne Chips and Junghanns
22
 * libgsm + header files (libgsm / libgsm-dev on Debian)
23
 * A working Asterisk setup
24
25
26
=== Installation ===
27
28
First of all we assume the following:
29
 * Layout of your working directory:
30
   * openbsc/  - checkout from OpenBSC repo
31
   * lcr/      - checkout from LCR repo
32
 * Installation directories:
33
   * /opt/openbsc for OpenBSC
34
   * /opt/lcr for LCR
35
36
We need to compile and install OpenBSC first:
37
{{{
38
$ cd openbsc/
39
$ sh ../lcr/autogen.sh
40
$ ./configure --prefix=/opt/openbsc
41
$ make
42
$ sudo make install
43
}}}
44
45
After that we're going for LCR. But we had to patch 2 files to make it work:
46
{{{
47
gsm@bts-ctrl:~/cdc/openbsc$ cd ../lcr
48
}}}
49
50
Edit Makefile.am and change
51
{{{
52
GSM_LIB = /usr/local/lib/libgsm.a /usr/local/lib/libbsc.a /usr/local/lib/libvty.a -ldbi -lcrypt
53
}}}
54
to
55
{{{
56
GSM_LIB = /usr/lib/libgsm.a /usr/local/lib/libbsc.a /usr/local/lib/libvty.a -ldbi -lcrypt
57
}}}
58
59
And patch gsm_audio.c on line 13 from
60
{{{
61
#include "/usr/local/include/gsm.h"
62
}}}
63
to
64
{{{
65
#include "/usr/include/gsm.h"
66
}}}
67
68
Now we can go on with compiling LCR:
69
{{{
70
$ sh autogen.sh
71
$ ./configure --prefix=/opt/lcr --with-asterisk --with-gsm
72
$ make
73
$ sudo make install
74
}}}
75 2
76
77
=== LCR configuration ===
78
'''1. gsm in options.conf'''
79
The gsm option in /usr/local/lcr/options.conf needs to be activated. This can be
80
simply done by adding 'gsm' as a single line to the file.
81
82
'''2. GSM interface in interface.conf'''
83
/usr/local/lcr/interface.conf holds an example for a GSM interface. Remove the comments
84
and use the example as is.
85
86
'''3. gsm.conf'''
87
Enable the debugging option in /usr/local/lcr/gsm.conf. We also need 2 mISDN loopback interfaces.
88
Create them with
89
{{{
90
  $ sudo modprobe mISDN_l1loop pri=1 nchannel=30
91
}}}
92
You can check for the interfaces names with the misdn_info tool. All the default settings
93
should work in a BS11 setup.
94
95
'''4. Routing'''
96
We route all our calls to to asterisk at the moment, as we only have outgoing connectivity via IAX/SIP in our setup.
97
{{{
98
[main]
99
interface=GSM                           : remote application=asterisk context=btsctrl
100
}}}
101
102
Calls will go to the context btsctrl in Asterisk.
Add picture from clipboard (Maximum size: 48.8 MB)