The kernel is now configured to support mISDN but still needs to be compiled.

go to the directory /usr/src/linux and type :

make dep; make bzImage; make modules; make modules_install

This might take a while depending on your CPU.

Now go back to the directory /usr/src/mISDNuser and type:

make

make install

If everything went well, you should now have a bunch of kernel modules and new kernel.
Reboot your computer with the new kernel and mISDN support.

It now depends on what type of card you want to use how to go on.

If you have a hfc based card, you will need to modprobe the hfcmulti module.

Before attempting to load any mISDN kernel modules, make sure there are no other modules loaded such as CAPI or HISAX.

No other drivers for this kind of chipset on the card should be loaded, as well as no other drivers that access mISDN.

Let’s show how to load the modules:

Depending on the brand and model of the card, you might have set some jumpers on the card.

When loading the kernel module, we will have to pass some parameters such as operating mode, number of ports and protocol used. Even if you set some jumpers on the card, the driver cannot auto detect this and you will have to provide them here again.

Let’s have a look at the possible options:

layermask: to set the operating mode of the card

Possible values:

0x3: for NT mode0xf: for TE mode

protocol: to set the card to point to multipoint or point to pointPossible values:

0x2: for point to multipoint (PmP) with a TE port0x22: for point to point (PP) with a TE port0x12: for point to multi point with an NT porttype0x32: for point to point with an NT porttype

type: to set the number of ports for the card.Possible values:

0x01: 1 port card0x02: 2 port card0x04: 4 port card0x08: 8 port card

these options have to be passed as parameters to modprobe when loading the drivers,

When you have multiple ports, you will have to supply multiple values for the layermask and protocol parameters as shown below.

For example:

modprobe hfcmulti layermask=0x3,0xf protocol=0x12,0x22 type=2

Would load the module for a 2 port card, where the first port is configured as a 0x3 (NT) using point to multipoint (0x12) and the second port is configured as a 0xf (TE) using point to point (0x22).

After loading the module for the card, you should still load the mISDN_dsp module by typing:

modprobe mISDN_dsp

2.7. chan_mISDN download and compilation

First make sure you downloaded asterisk into /usr/src/asterisk
Now goto the chan_misdn homepage and download the chan_misdn tar.gzip

At the moment of writing this tutorial, the latest version was:

chan_misdn-beta-0.1.0.tgz

Unpack this file into the directory /usr/src, this should create a new directory, called chan_misdn.

Enter this directory and open the Makefile, if you are using a version of asterisk that is more recent that version 1.0.2 or you are using CVS head, you will need to comment out the line with:

The configuration for chan_misdn is done with an extra configuration file in /etc/asterisk called misdn.conf

there are different sections in the configuration file, the first being the general section. Sections are put inside square brackets [] and the first section has to be called [general], this is similar to the layout of extensions.conf
All other (non general sections) can be seen as groups of one or more ports.

A port can be in one or multiple groups, with for example different msns. (See later)

The general section is for general configuration options, all other sections are so called channelgroups, in a channelgroup you first define the ports for this channelgroup and then the options for this channelgroup (if different from the general options).

The following options can be set:

context=

possible values: any string, that is also a valid context in extensions.conf
This is used to determine what context incoming calls on the BRI will be sent to.

e.g.: context=bri-incoming

language=

This is used to set the language for incoming calls on this port or group of ports.
The language option can be used to for example play prompts in a specific language.

e.g.: language=en

immediate=

When set to yes, this option will make sure the call jumps immediately into a context without waiting for a number to be dialed.
This is for example for when a telephone is connected to this port and when picking up the horn, you don't want to have a dial tone, but you want to go directly to dialing a specific person, or playing a specific message or... or ...

e.g.: immediate=no

debug=

The parameter to this option is a numeric value and will set how much debugging output you will get when something happens on the misdn channel, set it to 0 to disable debugging.

When you read the previous tutorial, you will know what an msn is, this option is to set to what msns this section will react. (or better to call with which msns this section will react).
It takes either numbers or an asterisk (*) as a parameter. An asterisk would mean that it would respond to any msn sent on the channel.
If you want it to react to multiple msns, you need to separate them by a comma.

e.g.: msns=* or
msns=12312312,12312313,12312314

ports=

The ports this section (group) applies to, if you want to put multiple ports here, you need to separate them by a comma.
If you want to use an NT port as a PTP connection (see the previous tutorial for what PTP or point to point or NT is), you need to add the suffix PTP to the port number.

e.g.: port=1,2,4 or
port=1ptp,2,3ptp

hold_allowed=

It defines whether it is possible to put a call on hold, on this port, or this group of ports.
I suspect this to be only valid for BRI end of the call, meaning that if a BRI user calls to an iax2 user, then the iax2 user will still be able to put the call on hold, but the BRI user can't.

e.g.: hold_allowed=yes

stop_tone_after_first_digit=

It determines if the dial tone (LA) will stop after the first digit, or will only stop after an extension is matched in the dialplan for this context.
This is only for calls incoming on BRI, e.g. an ISDN telephone connected to this BRI. The default setting is yes.

e.g.: stop_tone_after_first_digit=yes

append_digits2exten=

If it is set to yes, this will add an extra dialed digit to the dialplan variable ${EXTEN}.
I'm unsure what this does exactly, but i suppose that when you have an ISDN phone connected to this BRI, and you have an extension e.g.: 123, and you dial 1234, it would go to the extension 123, but the variable ${EXTEN} would not contain 123 but 1234. If you know more about this option, please let us know and submit a comment on the bottom of this page.

e.g.: append_digits2exten=yes

tracefile=

This is the absolute path to a log file where call traces will be sent to for debugging.

e.g.: tracefile=/tmp/bricalltrace.log

4. Dialplan usage:

In extensions.conf, a BRI channel can be used with:

Dial(mISDN/g:<groupname_in_misdn.conf>/<numbertodial>)

e.g.: exten =>123,dial(mISDN/g:group1/123123);
would dial number 123123 on the first line availble in the group called group1. (= the section called [group1] in misdn.conf).

or with Dial(mISDN/<portnumber>/<numbertodial>);e.g.: exten =>123,dial(mISDN/1/123123);

5. related CLI applications:

When the chan_misdn module is loaded into asterisk, some new CLI commands become available:

- misdn show config
Shows the present configuration for all misdn ports/channels

- misdn reload
Command, for reconfiguration of the chan_misdn module. This will be executed with a global „reload“ of the Asterisk.

- misdn show channels
Shows a list of all active mISDN channles.

- misdn show fullstacks
Shows the status of the ports and the channelstatus.

misdn send display <channel> <msg>
It sends a so called display message to the prescribed “channel”. If the connected terminal device is capable of displaying the message then the message will appear on the screen of the device.

I have purchased one BRI ISDN card from a Bulgarian reseller, assuring me that the card is from beronet. The card is one BRI port. I am running Asterisk on CentOS and I am very new, but I was attracted that with trixbox and asterisk I'll have a PBX very easy. Unfortunately it is not so easy I expected :-(

Can somebody help me how to setup the card and to have an working configuration. I have read tutorials, but it is so confusing and messy for me and I would prefer if there is somebody who would like to help me, to ask me a couplke of questions and after answering the questions to get a running configuration of asterisk. :-)

Best regards,
Ognyan

MiroslaV (vmiro at usa dot com)03 March 2007 16:16:21Hi,
I did everything like in this howto, I can compile and load chan_misdn, but ports are always down, when I type: "misdn show stacks" in asterisk CLI. What could be wrong?
I'm struggling with this problem for several days. :(
Thanks!

aiks (juris dot breicis at gmail dot com)29 November 2006 09:54:30I believe this should be added to tutorial:
Please be warned that using different kernel timing than default (250) will most likely lead to problems. Poll parameter in /etc/misdn_init.conf will have to have different value than given in configuration file comments. Also different poll variable value than ones presented in those comments might lead to slipping frames and asterisk not being able to load chan_misdn.so (if a refernce to configuration file is given in misdn.conf)

Hashim (hashrk at yahoo dot com)15 October 2006 18:56:57I solved it. It's SElinux problem. Just disable it. It works. But I still couldnt complete the configuration of b410p. Is there anyone really configured this card. I wanna salute him ...

Cheeeeers,

Hashim

hash (hashrk at yahoo dot com)14 October 2006 17:48:58Hi Guyz ..

I am new to mISDN. I have completed almost but I can't load chan_misdn.so.. while loading I am getting an error ... Like

By trial and error the resolutions was to let /etc/init.d/misdn-init config create the basic /etc/misdn-init.conf file and manually add the following line into /etc/misdn-init.conf:
card=1, w6692pci, dtmf

I use a Dynalink TAS106hc winbond card with one port, connected to an NT so the total file looks like:

te_ptmp=
poll=64
debug=0

card=1, w6692pci, dtmf

Then running /etc/init.d/misdn-init stop and misdn-init start gave me the following dmesg output:

open drivers/isdn/hardware/mISDN/hfcmulti.c and replace everywhere pci_find_subsys with pci_get_subsys

according to Documents/pci.txt :
8. Obsolete functions
~~~~~~~~~~~~~~~~~~~~~
There are several functions which you might come across when trying to
port an old driver to the new PCI interface. They are no longer present
in the kernel as they aren't compatible with hotplug or PCI domains or
having sane locking.

[snip]
pci_find_subsys() Superseded by pci_get_subsys()

Add Comment

Name:

Email:

Comment:

In order to prevent automatic posting on our website, we kindly request you to type in the number you see in the picture below.