dahdi安装笔记

来源:互联网 发布:江苏电信测速软件 编辑:程序博客网 时间:2024/05/17 01:11

一、使用fxstest

dahdi-linux-complete-2.11.1+2.11.1/tools

使用make && make install 生成的fxstest复制到/usr/sbin 目录下去


二、在astrtisk -r 后的界面module load chan_dahdi.so 错误

[Aug 24 10:47:12] WARNING[11919]: pbx.c:7074 ast_register_application2: Already have an application 'DAHDISendKeypadFacility'
[Aug 24 10:47:12] WARNING[11919]: pbx.c:7074 ast_register_application2: Already have an application 'DAHDISendCallreroutingFacility'
[Aug 24 10:47:12] WARNING[11919]: config.c:1486 process_text_line: No '=' (equal sign) in line 1646 of /etc/asterisk/chan_dahdi.conf
[Aug 24 10:47:12] ERROR[11919]: chan_dahdi.c:12653 mkintf: Signalling requested on channel 1 is FXO Loopstart but line is in FXO Kewlstart signalling
[Aug 24 10:47:12] ERROR[11919]: chan_dahdi.c:17228 build_channels: Unable to register channel '1'


更改vim /etc/dahdi/system.conf的内容

# Autogenerated by /usr/sbin/dahdi_genconf on Fri Aug 18 17:47:09 2017# If you edit this file and execute /usr/sbin/dahdi_genconf again,# your manual changes will be LOST.# Dahdi Configuration File## This file is parsed by the Dahdi Configurator, dahdi_cfg## Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER) fxsks=1echocanceller=mg2,1fxols=2echocanceller=mg2,2# channel 3, WCTDM/4/2, no module.# channel 4, WCTDM/4/3, no module.# Global dataloadzone        = cndefaultzone     = cn


----------------
fxsks=1 改为 fxols=1
fxols=2 改为 fxsks=2
可以使用dahdi_cfg -vvv  
root@povodo:/etc/dahdi# dahdi_cfg -vvv
DAHDI Tools Version - 2.11.1


DAHDI Version: 2.11.1
Echo Canceller(s): 
Configuration
======================

Channel map:


Channel 01: FXO Loopstart (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)


2 channels to configure.


Changing signalling on channel 1 from FXO Kewlstart to FXO Loopstart
Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
可以看出来: channel 01是FXO Lookstart
channel 02是FXS Kewlstart
三、reload时出错
Error[4663]: chan_dahdi.c:10946 build_channels: Unable to reconfigure channel '2' 
Error[4663]: chan_dahdi.c:11970 reload: Reload of chan_dahdi.so is unsuccessful!
解决办法:

在chan_dahdi.conf关联dahdi-channels.conf(chan_dahdi.conf的最后一句是#include dahdi-channels.conf) 且这两个文件中有两份关于channel 2的配置(删除chan_dahdi.conf的channels 2的配置)

四、make all 是报错

make -C linux all
make[1]: Entering directory `/usr/local/src/dahdi-linux-complete-2.11.1+2.11.1/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory `/usr/local/src/dahdi-linux-complete-2.11.1+2.11.1/linux/drivers/dahdi/firmware'
make[2]: Leaving directory `/usr/local/src/dahdi-linux-complete-2.11.1+2.11.1/linux/drivers/dahdi/firmware'
You do not appear to have the sources for the 2.6.32-696.10.1.el6.x86_64 kernel installed.
make[1]: *** [modules] Error 1
make[1]: Leaving directory `/usr/local/src/dahdi-linux-complete-2.11.1+2.11.1/linux'
make: *** [all] Error 2
解决办法:

 yum install kernel-devel