安装Asterisk<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />











 







 
  

 
  
 
  
 
  
 
  
 
  
 
  


装了asterisk-sounds-1.2.1,音质有很大提高,但仍存在不稳定的问题,但客户端与服务器之间通话质量可以保证,尤其是服务器端收听到的音质异常清晰

Asterisk单口E1/T1中继线接口卡

Zapdat安装好之后,需手动加载E1卡的驱动才行,可将其加入到/etc/rc.local内开机时自动加载。加载方法为:
Modprobe zaptel
Modprobe wct4xxp(TE210P)?
wctel1xp(TEL10P)          //使用WCT4XXP或者WCTE11XP具体看卡的型号

配置相关参数需编辑/etc/zaptel.conf (使用TEL10P卡时“[]”内容不需要)
span=1,1,0,ccs,hdb3,crc4
[span=2,2,0,ccs,hdb3,yellow]
bchan=1-15,17-31[,32-46,48-62]     \\
配置中继线接口卡中的B信道

dchan=16[,47]                      \\
配置中继线接口卡中的D信道
loadzone=cn                         \\
区域名
defaultzone=cn

配置/etc/asterisk/zapata.conf:
1)
屏蔽中间下面这行的配置
signalling=fxo_ls
2)
取消文件末尾处下列几行注释符号;
switchtype = euroisdn
signalling = pri_net (
pri_cpe,两台必须配置不同以便实现双机直接互联
)
group = 1
channel => 1-15,17-31[,32-46,47-62]
TEL10P卡不用配置“[]”内的内容)

配好后可用ztcfg –cvvvg看看有没有什么错误。

安装 APACHE+PHP+PHPMYADMIN使用WEB页面管理MYSQL数据库

安装APACHE

Tar vzxf apache-1.3_20060604101640.tar.gz

Cd apache-1.3

./configure --prefix=/fancy/apache --enable-module=so --enable-module=rewrite --enable-shared=max --htdocsdir=/fancy/www (指定安装路径)

MAKE

MAKE INSTALL

/fancy/apache/bin/apachectl start(启动apache服务)

IE上打开测试地址HTTP//Server IP Address检查APACHE服务是否正常

安装PHP4

tar vzxf php-4.4.3RC1.tar.gz

./configure \

 --prefix=/fancy/php \

--enable-force-cgi-redirect \

  --with-gd --enable-gd-native-ttf \

 --with-ttf \

 --with-gdbm \

 --with-gettext \

 --with-iconv \

  --with-png \

 --with-zlib \

 --with-xml \

 --enable-calendar \

 --with-apxs=/fancy/apache/bin/apxs(如果MAKE时出错,则去掉这一句)

Make

Make install

php的配置文件拷贝到相应的目录下

  cd ../php

  cp php.ini-dist /usr/local/lib/php.ini

  php.ini基本可以不用作什么修改,要修改可以参照相应的说明。

PHP.INI 添加

;extension=php_xslt.dll

;extension=php_yaz.dll

;extension=php_zip.dll

extension=/usr/lib/php4/ldap.so(添加这一条使PHP支持LDAP

 配置完PHP就该配置Apache Web SERVER了,先对httpd.conf进行配置

  cd /usr/local/apache/conf

  vi httpd.conf

在这里能看到LODMODEM。并且在LIBEXEC       目录中有MOD文件。

  针对php要对以下内容进行修改:

  # AddType application/x-httpd-php .php

  # AddType application/x-httpd-php-source .phps

 

然后写个php测试页info.php:内容如下

 

 <?php
 phpinfo();
 ?>
 正常的话,应该能看到php的信息了,恭喜你的Apche+Mysql+PHP安装成功。
PHPMYADMIN(MYsql web管理工具)配置

Cd /fancy/www/php/ libraries/
Vi config.defaule.php
修改如下部分
$cfg['Servers'][$i]['auth_type']     = 'cookie';    // 验证方式 (config, http 或者cookie,从安全性考虑建议使用HTTP)
$cfg['Servers'][$i]['user']          = 'test';      // MySQL user
$cfg['Servers'][$i]['password']      = '*******';          // MySQL password (only needed
                                                    // with 'config' auth_type)
.登入时如果出现

1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

造成这个问题的原因是:如果你升级mysql4.1以上版本后遇到以上问题,请先确定你的mysql client 4.1或者更高版本.
 
  

mysql>SET PASSWORD FOR
->
'some_user'@'some_host'=OLD_PASSWORD('newpwd');

实例:mysql数据库用户名为'abc',密码为'123456',则按上面例子在服务器mysql命令行窗口中实际实施的语句如下:
mysql>SET PASSWORD FOR
->
'abc'@'localhost'=OLD_PASSWORD('123456');

安装a2billing软件使用WEB管理ASTERISK

Tar –vzxf Asterisk2Billing_release_Chameleon_v1_2_3[1].tar.gz

Cd Asterisk2Billing_release_Chameleon_v1_2_3[1]

./install.sh

1-. A2Billing_UI

2-. A2BCustomer_UI

3-. A2Billing_AGI

4-. Exit

导入数据库

Cd Asterisk2Billing_release_Chameleon_v1_2_3[1]/Database/mysql/ Mysql-5.x

Mysql –u root –p <

mysql -u root -p < a2billing-MYSQL-createdb-user.sql

查看MYSQL数据库中增加   Mya2billing数据库

mysql -u root -p mya2billing < a2billing-mysql-schema-MYSQL.5.X-v1.2.3.sql

查看MYSQL数据库中增的Mya2billing库中增加了31个表

分别选择123安装A2BILLING

配置A2billing

Vi /etc/asterisk/ a2billing.conf

[database]

hostname=localhost

port=5432

user=root

password=********

dbname=mya2billing

;dbtype=postgres

dbtype=mysql

SIP用户写到MYSQL数据库中

编辑/etc/asterisk/extconfig.conf添加

sipusers => mysql,mya2billing,cc_sip_buddies(分别指定数据库类型,数据库名,数据库表名)

sippeers => mysql,mya2billing,cc_sip_buddies

修改res_mysql.conf配置SIP连接MYSQL的参数

[general]

dbhost = localhost

dbname = mya2billing

dbtable = cc_sip_buddies

dbuser = root

dbpass = ********

dbport = 3306

;dbsock = /tmp/mysql.

dbsock=/var/lib/mysql/mysql.sock

配置记费软件

编辑cdr_mysql.conf添加记费软件写入的数据库和表名

[global]

  hostname=localhost

  dbname=billing

  table=cdr

  user=root

  password=********

  ;port=3306

  ;sock=/tmp/mysql.sock

  ;userfield=1

  sock=/var/lib/mysql/mysql.sock