Difference between revisions of "FreePBX/mISDN"
m (→Description) |
|||
Line 52: | Line 52: | ||
====Create a trunk in FreePBX==== | ====Create a trunk in FreePBX==== | ||
− | + | Now log into FreePBX admin interface in the server-manager, a create a new trunk, type "custom". | |
+ | Enter the common information, like any other trunk (caller ID, max call etc...) | ||
+ | Then, enter the following for the dialstring: | ||
+ | mISDN/g:trunks/$OUTNUM$ | ||
+ | |||
+ | Here, '''g:''' means we send the call to a group of ports defined earlier in /etc/asterisk/misdn.conf (in this example, we have craeted a group called '''trunks''', with all the four ports) | ||
+ | |||
+ | You could also define a trunk per port with something like: | ||
+ | mISDN/1/$OUTNUM$ | ||
+ | |||
+ | This would only send calls via the port number 1 of the card | ||
+ | |||
+ | Now you can configure an outbound route to use this trunk and test if it's working. |
Revision as of 10:14, 5 June 2009
Maintainer
Daniel B.
Firewall Services
mailto:daniel@firewall-services.com
Description
The goal of this how-to is to explain how to configure an hardware card supported by the mISDN driver, in order to use it with FreePBX
Installation
Plug your card
Of course, the first step here is to plug your card in a free PCI slot
Install mISDN driver
Now you need to install the mISDN driver. You can use the following command:
yum --enablerepo=smecontribs install misdn misdnuser misdn-kmdl-$(uname -r)
For this to work you may need to update your server (at least, you should have the latest kernel available)
Configure the driver
You can check the card is recognized and supported with this command:
/etc/init.d/mISDN scan
Now, you can generate a basic configuration with:
/etc/init.d/mISDN config
The generated config file is /etc/mISDN.conf The default will configure all available ports in te mode. This is ok if you only want to use the ports as trunks. If you want to connect an ISDN phone, you'll have to change the corresponding port to nt mode.
Now, you need to configure this driver to be loaded automatically at system boot:
db configuration set mISDN service status enabed ln -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S09mISDN ln -s /etc/rc.d/init.d/e-smith-service /etc/rc6.d/K16mISDN
Install the channel for asterisk
For asterisk to work with mISDN, it needs a channel (chan_misdn). For now, you need to take this package from ATrpms repository (in the future, this package should be imported in smecontribs)
yum --enablerepo=atrpms install asterisk-misdn
This may also update asterisk, it shouldn't be a problem.
Configure the channel
Now, you can configure the channel. The config file is /etc/asterisk/misdn.conf Most of the config should be OK (at least, it was for me, in France). You just need to change the mISDN config file:
sed -i -e "s/\/etc\/misdn-init.conf/\/etc\/mISDN.conf/g"
You may alos want to enable echo cancellation (default is disabled). Thee configuration file is well commented.
The most important part is to configure group of ports, for example:
[trunks] ports=1,2,3,4 context=from-trunk msns=*
This will configure a group of ports (from 1 to 4). The name of this group is "trunks". Any calls comming from one of these ports will be processed from the from-trunk context (the default context for trunks in FreePBX
Create a trunk in FreePBX
Now log into FreePBX admin interface in the server-manager, a create a new trunk, type "custom". Enter the common information, like any other trunk (caller ID, max call etc...) Then, enter the following for the dialstring:
mISDN/g:trunks/$OUTNUM$
Here, g: means we send the call to a group of ports defined earlier in /etc/asterisk/misdn.conf (in this example, we have craeted a group called trunks, with all the four ports)
You could also define a trunk per port with something like:
mISDN/1/$OUTNUM$
This would only send calls via the port number 1 of the card
Now you can configure an outbound route to use this trunk and test if it's working.