Tuesday, September 20, 2011

Asterisk ISDN using chan_lcr (LCR)

Asterisk with mISDNV2 using chan_lcr

Setting up ISDN Support in Asterisk using chan_lcr module

In this both LCR and Asterisk should be running,LCR handles all the ISDN related stuffs signaling and transmits to asterisk using

socket to chan_lcr.

 

A.Prepare fedora installation (Fedora 11 -2.6.30)

1. Install following packages

Yum install kernel,gcc,patch,autconf,vim,samba,openssh,newt-devel,gtk2-devel,gcc-c++,libtermcap-devel

 

2. Remove already exisiting misdn_core ,and hfc drivers (hfcpic.ko)

Delete

/lib/modules/2.6.30.10-105.2.23.fc11.i586/kernel/drivers/isdn

 

B.Installatin of mISDN,mISDNuser and LCR

1. Dowload all the packages from LCR site

http://isdn.eversberg.eu/download/lcr-1.7/mISDN-20100525.tar.gz

http://isdn.eversberg.eu/download/lcr-1.7/mISDNuser-20100525.tar.gz

http://isdn.eversberg.eu/download/lcr-1.7/lcr-20100601.tar.gz

2. Install Misdn Core

  • ./configure
  • Copy mISDN.cfg.default to standalone/mISDN.cfg and edit it for you needs

Comment these

#CONFIG_MISDN_HFCMULTI_8xx

#CONFIG_MISDN_HFCUSB

#CONFIG_MISDN_XHFC

#CONFIG_MISDN_L1LOOP

#CONFIG_MISDN_AVMFRITZ

#CONFIG_MISDN_SPEEDFAX

#CONFIG_MISDN_INFINEON

#CONFIG_MISDN_W6692

#CONFIG_MISDN_NETJET

#CONFIG_MISDN_IPAC

#CONFIG_MISDN_ISAR

  • make modules
  • make modules-install
  • insert the kernel modules created :

a.insmod ./standalone/drivers/isdn/mISDN/mISDN_core.ko  ( dmesg shows Modular ISDN core version 1.1.21 NET: Registered protocol family 34)

b.insmod ./standalone/drivers/isdn/mISDN/mISDN_dsp.ko

c.insmod ./standalone/drivers/isdn/hardware/mISDN/hfcpci.ko

 

(Note :

dmesg shows

hfcpci 0000:01:07.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

mISDN_hfcpci: found adapter CCD/Billion/Asuscom 2BD0 at 0000:01:07.0

mISDN: HFC-PCI driver 2.0

HFC-PCI: defined at mem 0xe1beac00 fifo 0xd89c0000(0x189c0000) IRQ 16 HZ 1000

HFC 1 cards installed

)

3.Install misdn user

· cd mISDNuser

· (2.6.32.2 use --with-AF_ISDN=34 (e.g. dmesg | grep family))

./configure --with-AF_ISDN=34

· make

· make install

ln -s /home/alok/ISDN/mISDNuser/lib/.libs/libmisdn.so /usr/lib/libmisdn.so.0

ln -s /home/alok/ISDN/mISDNuser/suppserv/.libs/libsuppserv.so /usr/lib/libsuppserv.so.0

 

4.Install LCR

Before installing LCR ensure asterisk is compiled,

cp -r asterisk-1.4.34/include/asterisk /usr/include/

./configure –with-asterisk

make

make install

Copying chan_lcr to asterisk

This creates a channel driver to interact with LCR - “chan_lcr” copy these channel driver so to asterisk module folder

cp chan_lcr.so  /usr/lib/asterisk/modules/

 

Run Programs

1.Start LCR

2.Start Asterisk now asterisk listerning to LCR using socket through chan_lcr

image image

 

Like asterisk configuration files sip.conf ,extensions.conf LCR to has configuration

most important is routing.conf and interface.conf.

Below is sample conf files to make SIP <->ISDN.

Generic Dialplans

Change asterisk conf files

Extensions.conf

[default]

exten => 1000,1,Dial(SIP/1000)

exten => 2000,1,Dial(SIP/2000)

include = asterisk_to_misdn

 

;directly called from lcr(ISDN to SIP)

[asterisk_from_misdn]

exten=>_X.,1,Dial(SIP/${EXTEN})

 

;SIP to ISDN

[asterisk_to_misdn]

exten => 8000,1,Dial(LCR/misdn/8000)

Dialing 8000 with Dial Phone connect to ISND port.

 

Change LCR conf files

interface.conf

[misdn]

portnum 0

nt

msn 8000

routing.conf

[main]

: remote application=asterisk context=asterisk_from_misdn

 

Some other Dialplan notes

ISDN to SIP

Interface.conf

[misdnintern]

portnum 0

nt

msn 400 ;this is called id of ISDN phone

>>Eg.1

Rounting.conf 
[main]
dialing=5678   : remote application=asterisk context=extern_context exten=5
extensions.conf
[extern_context]
exten=>5,1,Dial(SIP/1000)
 
Note:here dialing 5678 from ISDN Phone will call extern_context and send exten=5 so it will dial 1000
 
>>Eg.2
Generic calling
Rounting.conf 
[main]
: remote application=asterisk context=extern_context
extensions.conf
[extern_context]
exten=>_X.,1,Dial(SIP/${EXTEN})

Note:Dialing any number from ISDN will call extern_context in extensions.conf and will pass extension whatever we have dialed.i.e 1000 from ISDN phone will dial SIP/1000.

 

>>Eg.3

Routing through interface

Rounting.conf 
[main]

interface=misdnintern : remote application=asterisk context=extern_context

extensions.conf
[extern_context]
exten=>_X.,1,Dial(SIP/${EXTEN})

No comments:

Post a Comment

Featured Post

XDP - Getting Started with XDP (Linux)