This page is user-contributed information, and not official documentation by the Osmocom project. It might be outdated or inaccurate.
Please help by improving this document, or reporting any issues to the relevant mailing list.

Please be aware that LCR is obsolete and osmo-sip-connector should be used istead.

OsmoNITB LCR gives short setup and run OsmoNITB and LCR with Asterisk.

This tutorial describes a similar approach to set up an OpenBSC network-in-a-box with Asterisk.

Follow the instructions at Build from Source to build and install the following Osmocom projects:
  • libosmocore
  • libosmo-abis
  • openbsc

lcr, mISDN and mISDNuser source codes are available at

You can use git client to download the source.

  • LCR
cd ../../lcr
ln -s ../libosmocore/ .
ln -s ../openbsc/openbsc/ .
./configure --prefix=/usr --with-asterisk --with-gsm-bs
sudo make install
cp /usr/lib/asterisk/modules/

On Debian 6 chan_lcr module will be loaded automatically on service restart, but in case it does not load
automatically, it is recommend adding the following line to your /etc/modules.conf
load =>

  • Configuring the system environment
depmod –a
modprobe mISDN_core
modprobe mISDN_dsp
modprobe mISDN_l1loop nchannel=30 interfaces=2

(Optional) Add following lines to your /etc/modules file if you want your system to load the modules
automatically during boot

mISDN_l1loop nchannel=30 interfaces=2
  • Configuring LCR
  • Configuring GSM-BS
cd /usr/etc/lcr
nano interface.conf

Uncomment GSM section where it says ‘gsm-bs’. It is an interface for GSM Base Station, in this case,
osmo-nitb. Now LCR will connect to OpenBSC using its MNCC socket.
Add ‘bridge ast’ at the bottom of the GSM section. Now all calls from the GSM Base Station will be
forwarded to Asterisk.

  • Set up chan_lcr
remote asterisk
context from-lcr
earlyb no
tones yes
bridge GSM

LCR will connect to Asterisk using chan_lcr using context name ‘from-lcr’. Calls from Asterisk will be
forwarded to OpenBSC. The phone numbers defined in hlr.sqlite3 will be used to identify mobiles within
the network. Please refer to the example Asterisk configuration given below.

  • Remove unnecessary interfaces

Comment the last two interfaces named Ext and Int. We do not need these interfaces. Now you have
chan_lcr and GSM Base Station interface bridged to each other. All calls from one interface will be
redirected to the other. No more routing configurations are necessary at this point.

  • Set up permissions
nano options.conf

Uncomment the following 2 lines. LCR will not connect to chan_lcr if you do not set the user and group it
runs on.

socketuser asterisk
socketgroup asterisk
  • Configuring Asterisk

Following is a simple example of asterisk dialplan that can be used to route all calls from OpenBSC back
to OpenBSC. But a few extensions listed in the default dialplan are accessible. Add the following lines to
your /etc/asterisk/extensions.conf

include => default
exten => _X.,1,Dial(LCR/ast/${EXTEN:0},60)

In this case, I am adding the default Asterisk dialplan. In Asterisk, default dialplan provides some features
to test drive your network. You can call 1234 for information on Asterisk, and 600 for latency test. Please
refer to the configuration file for more extensions. You might want to remove the default dialplan after
you confirm that the network is working properly

Building and Running OpenBSC with Asterisk__v1.0.pdf (159 KB) manatails, 03/09/2013 12:35 AM