OpenBSC with Asterisk » History » Revision 10
« Previous |
Revision 10/74
(diff)
| Next »
wirelesss, 12/08/2016 03:55 PM
DISCLAIMER¶
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.
Next link https://osmocom.org/projects/osmonitb/wiki/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 http://git.misdn.org
You can use git client to download the source.
- LCR
cd ../../lcr ln -s ../libosmocore/ . ln -s ../openbsc/openbsc/ . sh autogen.sh ./configure --prefix=/usr --with-asterisk --with-gsm-bs make sudo make install cp chan_lcr.so /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 => chan_lcr.so
- Configuring the system environment
ldconfig 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_core mISDN_dsp 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
[ast] 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
[from-lcr] 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
Updated by wirelesss over 7 years ago · 10 revisions