在Ubuntu环境安装asterisk+FreePBX常见问题以及解决办法

 一.编译asterisk和安装Freepbx多处依赖错误

 

1.configure: error: no acceptable C compiler found in $PATH

解决办法:apt-get install gcc

2.configure: error: C++ preprocessor “/lib/cpp” fails sanity check

解决办法:apt-get install g++或者apt-get install build-essential

3.

configure: *** XML documentation will not be available because the ‘libxml2’ development package is missing.

configure: *** Please run the ‘configure’ script with the ‘–disable-xmldoc’ parameter option

configure: *** or install the ‘libxml2’ development package.

解决办法:安装 libxml2-dev也没用,直接./configure ‘–disable-xmldoc’

4.

configure: error: *** termcap support not found (on modern systems, this typically means the ncurses development package is missing)

解决办法:apt-get install ncurses-dev

5.

[FATAL] PEAR must be install (reauires DB.php). Include path: .:/usr/share/pear:/usr/local/src/PEAR

解决办法:pear install db

 

二.Unknown SQL engine

错误表现:安装完FreePBX后进入admin页面,显示错误:未知数据库引擎.

 

FATAL ERROR

Unknown SQL engine: []

Trace Back

/var/www/html/admin/common/db_connect.php:57 die_freepbx()

[0]: Unknown SQL engine: []

/var/www/html/admin/bootstrap.php:75 require_once()

[0]: /var/www/html/admin/common/db_connect.php

/var/www/html/admin/config.php:61 require()

[0]: /var/www/html/admin/bootstrap.php

 

解决办法:

vi /etc/apache2/httpd.conf

默认是空文件,添加两行

User asterisk

Group asterisk

/etc/init.d/apache2 restart

重启apache后问题解决.

 

三.Registering 无法注册分机

错误表现:在FreePBX中添加分机后,软电话无法正常注册分机.长时间Registering

 

解决办法:

执行 asterisk -r 命令,摁s键后tab键,看是否有sip命令.如果没有

则执行module load chan_sip.so,加载sip模块.

重启asterisk后问题解决.

如果不是以上问题,则是asterisk的端口被防火墙封死,执行iptables -F

 

四.分机之间无法打通电话

错误表现:软电话可以正常注册多个分机.但拨打另一个分机号码后无法打通电话.

执行asterisk -r 打开asterisk控制台

当客户端软电话注册分机时显示如下错误

chan_sip.c:8876 process_sdp: No compatible codecs, not accepting this offer!

 

解决办法:

在软电话设置中确保selected codecs包含a-law或u-law


或者在FreePBX的分机设置中allow和disallow选项中设置对应的编码格式

 

 

 

Leave a Reply

索克维尔旗下产品 · CXMind AI联络中心 · WCC全渠道联络中心