chan misdn

**Follow these steps before installing**

A) Check that your card is being detected correctly:

lspci

Your should see something like this in case of HFC single port card, look for your case if different:

...
01:03.0 Network controller: Cologne Chip Designs GmbH ISDN network controller [HFC-PCI] (rev 02)
...

B) If you have a multi-port card unload these drivers:

vi /etc/sysconfig/zaptel

comment out (with # in the beginning of each line) all cards except ztdummy (just in case):

vi /etc/modprobe.d/blacklist:

add the following lines at the end:

blacklist hisax
blacklist hisax_fcpcipnp
blacklist hisax_isac
blacklist crc_ccitt
blacklist isdn
blacklist slhc
blacklist capi
blacklist capifs
blacklist kernelcapi
blacklist kernel_capi
blacklist avmfritz
blacklist hfc4s8s_l1

... and restart your machine before anything.

C) The standard configurations generated by the command "isdn-init config" and those settings in "/etc/asterisk/misdn.conf" should work great with most cards but in some cases you should define according to your system configuration and ISDN telco specs among your own preferred ISDN behaviors with Asterisk.


==================================================
Trixbox 2.8.x - Asterisk 1.6.x only
==================================================

1. Install mISDN:
mISDN is installed by default in trixbox 2.8

Start with step 2 in the next section

If you have problems with showing card in asteriks (misdn show stacks)
You must install asterisk-chan_misdn, but before that you must crate a symbolic links

ln -s /usr/lib/libisdnnet.so /usr/lib/libisdnnet.so.0
ln -s /usr/lib/libmISDN.so /usr/lib/libmISDN.so.0
ln -s /usr/lib/libsuppserv.so /usr/lib/libsuppserv.so.0

Then

yum -y --enablerepo=trixboxbeta install asterisk-chan_misdn


==================================================
Trixbox 2.6.x - Asterisk 1.4.x only
==================================================

Tested until TB 1.4.19, but should do fine with latest versions

Addition: Using "yum upgrade" to ensure you're up to date may well give a more reliable outcome.

1. Install mISDN:

yum -y --enablerepo=trixboxbeta install asterisk-chan_misdn mISDNuser mISDN-modules mISDN

Addition: if the above fails due to dependencies, the following notes may help : misdn-installation-problem-dependencies-missing.

2. Install first the following (thanks to kostasics)

yum install bc
yum install usbutils

Installing card (@ system level):

misdn-init scan
misdn-init config (change this to PTP if you're not using MSNs as PTMP by default)
misdn-init start (this command avoid restarting server in order to load card into system)

add it to your system boot:

chkconfig --add misdn-init

NOTE: If this command isn't working for you just add the following line to your rc.local:

vi /etc/rc.d/rc.local

and add before "/usr/sbin/amportal start" the following line:
misdn-init start

3. Copy the misdn sample file and edit for your ISDN line configuration (some options may differ from telcos)

cp /etc/asterisk-1.4.19_samples/misdn.conf /etc/asterisk/misdn.conf
vi /etc/asterisk/misdn.conf

4. Restart asterisk and check status:

amportal restart
asterisk -r
misdn show stacks

You should see something like this:

BEGIN STACK_LIST:
  * Port 1 Type TE Prot. PMP L2Link DOWN L1Link:DOWN Blocked:0  Debug:0


==================================================
Trixbox 2.4.x - Asterisk 1.4.x only
==================================================

(Tested until TB 1.4.2, but should do fine with latest versions)

1. Install mISDN:

yum -y --enablerepo=trixboxbeta install asterisk-chan_misdn mISDNuser mISDN-modules mISDN

2. Installing card (@ system level):

misdn-init scan
misdn-init config
misdn-init start (this command avoid restarting server in order to load card into system)

add it to your system boot:

chkconfig --add misdn-init

NOTE: If this command isn't working for you just add the following line to your rc.local:

vi /etc/rc.d/rc.local

and add before "/usr/sbin/amportal start" the following line:
misdn-init start

3. Copy the misdn sample file and edit for your ISDN line configuration (some options may differ from telcos)

cp /etc/asterisk-1.4.17_samples/misdn.conf /etc/asterisk/misdn.conf
vi /etc/asterisk/misdn.conf

4. Restart asterisk and check status:

amportal restart
asterisk -r
misdn show stacks

You should see something like this:

BEGIN STACK_LIST:
  * Port 1 Type TE Prot. PMP L2Link DOWN L1Link:DOWN Blocked:0  Debug:0


==================================================
Trixbox 2.2.x - Asterisk 1.2.x
==================================================

(Tested with TB 1.2.12, but should do fine with latest versions)

1. Install dependencies:

yum -y install kernel-smp-devel asterisk-devel spandsp-devel

If you got some error regarding to kernel-devel try this:

uname -r

mine shows:
2.6.9-34.0.2.ELsmp
Which means that my kernel is SMP, if yours is without smp at the end of line please install kernel-devel like this:

yum -y install kernel-devel

2. Installing mISDN and card (@ system level):
...installing packages:

wget http://www.beronet.com/downloads/install-misdn-mqueue.tar.gz
tar xzf install-misdn-mqueue.tar.gz
cd install-misdn-mqueue
make install

..installing hardware:

misdn-init scan
misdn-init config
misdn-init start (this command avoid restarting server in order to load card into system)

add it to your system boot:

chkconfig --add misdn-init

NOTE: If this command isn't working for you just add the following line to your rc.local:

vi /etc/rc.d/rc.local

and add before "/usr/sbin/amportal start" the following line:
misdn-init start

3. Restart asterisk and check status:

amportal restart
asterisk -r
misdn show stacks

You should see something like this:

BEGIN STACK_LIST:
  * Port 1 Type TE Prot. PMP L2Link DOWN L1Link:DOWN Blocked:0  Debug:0

If you have any problem with load chan_misdn.so (Error: No such command "misdn show stack") in TrixBox 2.8, please try to create a symlinks.
Here is a way to that:

ln -s /usr/lib/libisdnnet.so /usr/lib/libisdnnet.so.0
ln -s /usr/lib/libmISDN.so /usr/lib/libmISDN.so.0
ln -s /usr/lib/libsuppserv.so /usr/lib/libsuppserv.so.0

Then restart asterisk
Use command "misdn show stacks"
Source: http://bbs.openvox.cn/redirect.php?tid=890&goto=lastpost

If you have problem with incoming calls, try to add this code to "/etc/asterisk/misdn.conf"

[isdn]
ports=1
context=from-pstn
msns=*

Then restart...

References:
Searching within Trixbox and Asterisk forums:
http://www.trixbox.org/forum
http://forums.digium.com/
The Official Wiki from mISDN:
http://www.misdn.org/index.php/MISDN_with_Asterisk
There is a post where alabibomba could make OSLEC available to mISDN to do some echo cancellation, if you are having these problems try these instructions:
http://www.trixbox.org/forums/trixbox-forums/trunks/trixbox-2-4-c...
misdn.conf: Sample file for single port single card HFC system configuration:
[general]
debug = 0
method=standard
bridging=no
stop_tone_after_first_digit=yes
append_digits2exten=yes
dynamic_crypt=no
crypt_prefix=**
crypt_keys=test,muh

[default]
context=misdn
language=en
musicclass=default
senddtmf=yes
far_alerting=no
allowed_bearers=all
nationalprefix=0
internationalprefix=00
rxgain=0
txgain=0
te_choose_channel=no
pmp_l1_check=no
reject_cause=16
need_more_infos=no
nttimeout=no
method=standard
dialplan=0
localdialplan=0
cpndialplan=0
early_bconnect=yes
incoming_early_audio=no
nodialtone=no
callgroup=1
pickupgroup=1
presentation=-1
screen=-1
echocancel=yes
jitterbuffer=4000
jitterbuffer_upper_threshold=0
hdlc=no

[isdn]
ports=1
context=from-pstn
msns=*
Adding mISDN as trunk (with the same configutarion file):
Create a Custom Trunk with Custom Dial String like this:
mISDN/g:isdn/$OUTNUM$

(note that [isdn] group in config is being called here...)
------------------------------------------------------------------------------------------------
Wiki Home|Tutorials|Troubleshooting|Additional Scripts and Tricks|Hardware