D150
来自最权威最新完整开源SIP,语音通信,融合通信中文技术文档资料,提供详细的Asterisk Freepbx, FreeSBC, 免费会话边界控制器,网关,语音板卡,IPPBX,SBC配置资料-asterisk,freepbx,freesbc 用户手册 界面配置,呼叫路由,IVR, 网关对接,拨号规则,SIP 分机呼叫,pjsip, IVR, 录音, CDR, 队列呼叫,振铃组,CLI 命令中文资料手册
D150 语音编码卡单机安装说明文档
安装准备
- 确认现场可以提供以下电源要求:
D150-ETH-系列使用服务器或者电脑电源2A @ 5V (10W),或者外部供电电源 2A @ 5V (10W) D150-BOX-系列通过外部供电电源,要求:2A @ 5V (10W)
- 确认相应的编码转换软件包版本,最新更新请访问官方网站
sng-tc-linux-1.3.3.2.i686.tgz sng-tc-linux-1.3.3.2.x86_64.tgz sng-tc-windows-x86-1.2.3.tgz
- 硬件安装
安装编码卡 D150-ETH- 如果在其他电脑安装,找到一个空的PCI槽,插入板卡,注意只是使用PC 插槽,和PC本身没有任何通信。 D150-BOX- 放置在一个平整的表面,或者安装在机架上(需要购买机架配件)。
- 电源上电
D150-ETH-XX 使用电脑电源供电,要求2A @ 5V (10W),或者外部电源供电,要求:2A @ 5V (10W) D150-BOX-XX 使用外部电源供电,电源要求:2A @ 5V (10W)
- 插入网线,通过网卡直接访问D150编码卡模块(确认网卡IP和asterisk服务器IP在同一网段)。
下载编译支持包
- 下载编码转换软件包,确认和D150在同一网段
wget <URL of Package> // 官方下载 软件包:编码软件包 tar xfz sng-tc-<ver>-<arch>.tgz // 减压软件包 cd sng-tc-<arch>-<ver> // 进入到源代码目录 make // 执行编译 make install // 执行安装
服务器端通过Eth 0 自动检测D150 网卡地址
固件更新,如无必要,请不要更新
执行命令: sngtc_tool –dev ethX –firmware (‘X’代表第几个,例如Eth0) --> If the FROM and TO version are the same you are up to date so cancel the update; if the versions are different please update. --> If the update fails insure the ethX interface has a IP address (replace ‘X’ with the interface of the network) * Note sngtc_server must NOT be running during the update; sngtc_server_ctrl stop will stop the server if it is running.
配置编码转换模块
本步骤假设编码软件包和asterisk是安装在同一服务器的。如果是分布式的安装,请查看:
http://wiki.sangoma.com/Sngtc-Server-Configuration
以下步骤是安装asterisk编码转换模块,请确认asterisk有文件已经成功安装在 /usr/include/asterisk/路径下
cd sng-tc-<arch>-<ver> // 进入到源代码路径 make asterisk // 执行make asterisk 命令, 编译编码模块到asterisk 头文件目录下 make install // 安装模块
执行以下步骤将自动检测D150编码卡
sngtc_cfg --server --asterisk 默认选择所有选项 或者sngtc_cfg --server --asterisk --astdir=/etc/asterisk
[SNGTC_INFO ] [SNGTC_INFO ] ==================================================================== [SNGTC_INFO ] Configuring Sangoma Transcoding Server [SNGTC_INFO ] Configuring Sangoma Transcoding for Asterisk [SNGTC_INFO ] [SNGTC_INFO ] [SNGTC_INFO ] Detecting Transcoding Card & Modules ... [SNGTC_INFO ] [SNGTC_INFO ] Detected Transcoding Card & Modules: 1 [SNGTC_INFO ] [SNGTC_INFO ] [1]: eth0: Mac=XX-XX-XX-XX-XX-XX IP=192.168.1.X/255.255.255.0 [SNGTC_INFO ] -------------------------------------------------------- [SNGTC_INFO ] -> Transcoding-Module 1: Mac=XX-XX-XX-XX-XX-XX Error=0 [SNGTC_INFO ] [SNGTC_INFO ] -------------------------------------------------------- [SNGTC_INFO ] [SNGTC_INFO ] Please select device to configure: [1-1] q:quit 1 [SNGTC_INFO ] -------------------------------------------------------- [SNGTC_INFO ] Configuring eth0: Mac=XX-XX-XX-XX-XX-XX IP=192.168.1.X/255.255.255.0 0x7fc8d2d0a480 [SNGTC_INFO ] [SNGTC_INFO ] ---------------------------------------------------------- [SNGTC_INFO ] Please specify the base IP range for Transcoding Modules: [SNGTC_INFO ] Default IP value: 192.168.1.150/255.255.255.0 [SNGTC_INFO ] [SNGTC_INFO ] Specify last octet of the IP addres: [1-255] or <enter> for default: [SNGTC_INFO ] #> [SNGTC_RES ] Selected Transcoding Module IP/Mask = 192.168.1.150/255.255.255.0 [SNGTC_INFO ] [SNGTC_INFO ] ---------------------------------------------------------- [SNGTC_INFO ] Please specify the base UDP port for Transcoding Modules: [SNGTC_INFO ] Default udp base value : 15000 [SNGTC_INFO ] [SNGTC_INFO ] Specify udp base value [9000-65000] or <enter> for default: [SNGTC_INFO ] #> [SNGTC_RES ] Selected UDP Port Base 15000 [SNGTC_INFO ] [SNGTC_INFO ] ==================================================================== [SNGTC_INFO ] [SNGTC_INFO ] [SNGTC_INFO ] Sangoma Transcoding configuration file saved: /etc/sngtc/sngtc_server.conf.xml [SNGTC_INFO ] [SNGTC_INFO ] [SNGTC_INFO ] Asterisk Sangoma Transcoding configuration file saved: /etc/asterisk/sangoma_codec.conf [SNGTC_INFO ] root@ubuntuzm:/usr/src#
以上命令配置编码卡的IP地址,默认IP地址是<X.X.X>.150。
Asterisk Sangoma Transcoding 配置文件: /etc/asterisk/sangoma_codec.conf 编码卡服务端硬件配置文件,控制D150: /etc/sngtc/sngtc_server.conf
如果有多张D150编码卡,配置将被保存到以上文件。IP地址是(例如第一张 D150- 10.1.1.150, 第二张D150- 10.1.1.151,第三张 D150- 10.1.1.152...)
添加编码转换模块,使得默认加载asterisk编码转换.
vi /etc/asterisk/modules.conf 添加一行 "load => codec_sangoma.so",保存退出。 进入asterisk CLI,执行命令:reload, 重新加载编码模块
G729是默认加载的,如果要求其他的编码支持,请访问文档: http://wiki.sangoma.com/Codec-Support-and-Configuration-0#asterisk-codec-configuration.
操作
sngtc_server 服务端是编码转换的核心模块,它负责和编码转换卡进行双向数据通信。不能在同一服务器或者电脑上安装多个sngtc_server 服务端.注意,系统默认自动启动sngtc 服务端。手动执行命令:
- sngtc_server_ctrl (start|stop|restart)
root@ubuntuzm:/etc/asterisk# sngtc_server_ctrl start sngtc_server: Starting sngtc_server in safe mode ... sngtc_server: Starting processes... Starting sngtc_server...OK sngtc_server: Sangoma sngtc_server running.. sngtc_server: log file: /var/log/sngtc_server.log
- 确认asterisk编码模块以及加载,确认sngtc_server 已经成功启动,手动加载编码模块:
- Asterisk CLI> module load codec_sangoma.so
WARNING: There is a bug in Asterisk that may lead to crashes when loading codecs if there are 2 different modules providing the same translation paths. See this bug report for more information: http://issues.asterisk.org/view.php?id=17092. You can also read the sample configuration comments in sng-tc-<version>/codec/asterisk/sangoma_codec.conf.sample to learn more about work-arounds in case you face the problem.
如果出现报错信息,请编辑文件 vi /etc/asterisk/sangoma_codec.conf" 文件 添加以下参数: allownondahditiming=yes 保存文件,在asterisk CLI 执行:reload asterisk
Asterisk CLI 命令,检查编码转换模块数据:
Asterisk CLI> sangoma show translators(Shows codecs registered by codec_sangoma) Asterisk CLI> sangoma show transcoding sessions(Shows active transcoding sessions) Asterisk CLI> sangoma show rtp statistics(Shows real time RTP stats including dropped packets)
以下是编码板卡加载以后,无会话处理的显示信息:
Asterisk CLI> sangoma show transcoding sessions Total Sessions: 0 Asterisk CLI> sangoma show rtp statistics Asterisk CLI> sangoma show rtp statisticstranslators Asterisk CLI> siren7 to g729 g729 to siren7 slin16 to g729 g729 to slin16 g723 to g729 g729 to g723 ilbc to g729 g729 to ilbc gsm to g729