吴伟贤のBlog

Feed Rss

freeswitch g729官方授权购买及安装

12.30.2012, freeswitch, by .

因项目需要做G711->G729的转编码

参考了非官方的g729及咨询编码卡的价格,最终决定购买官方的G729编码,价格1channel 10美金

1:此文章前提是你已安装了freeswitch

2:授权只针对linux

一:添加订单

登录http://www.freeswitch.org/ 最上面的导航菜单选择G.729

点击最下面有个”Add to cart ”,  修改 Qty (数量) ,然后点击”Update Cart”,后”check out with paypal”,

使用paypal付款完后,返回订单,让你填写 公司名 联系电话 备注等信息 提交后

这时,请注意了,如果你还没注册过用户,会返回跟你paypal一样的用户名及随机生成的密码,请保管好这个.

下面将使用这个用户名及密码得到授权

二:取得授权

使用用户名密码登陆后 点击 网站首页 最左边的”My Account” ,点击”Order History”,点击order number后,找找有 Product Activation Code:

后面的就是授权码

三:安装授权

从下面链接下载g729安装文件

http://files.freeswitch.org/g729/

里面有两个安装文件

fsg729-191-installer

fsg729-194-installer

不知道区别是什么,我自己安装的是fsg729-191-installer

cd /usr/tmp

wget http://files.freeswitch.org/g729/fsg729-191-installer

chmod 755 fsg729-191-installer

./fsg729-191-installer

提示许可协议,按y 后安装完成,

运行/usr/local/freeswitch/bin/validator

G.729A licencing tool

You will require one or more sales codes to activate G.729A

Enter a sales code, or a blank line to end: xxxxxxxxxxxxxxxx (在这个提示内输入授权码)

Enter a sales code, or a blank line to end: (如果你只有一个授权码,第二个直接按回车就可)

Sales codes to be activated: xxxxxxxxxxxxxxxx

OK (Y/N)? y

Success. The file licences.zip contains valid licence(s) for G.729A. Unzip this to /etc/freeswitch/

提示Success后, 在当前目录下你会找到一个文件名为licences.zi的文件,这个文件要把他解包到/etc/freeswitch内

mv licences.zip /etc/freeswitch/

cd /etc/freeswitch/

unzip licences.zip

Archive: licences.zip

inflating: xxxxxxxxxxxxxxxx.conf

Please back this xxxxxxxxxxxxxxxx.conf as you do NOT need to re-validate your license once you have this signed file.

 

四;配置freeswitch,添加mod_com_g729模块

因mod_g729及mod_com_g729不能共存,所以必须先卸载mod_g729

卸载mod_g729

/usr/local/freeswitch/bin/fs_cli

unload mod_g729

加载mod_com_g729

load mod_com_g729

将可能输出如下文字:

freeswitch@internal> load mod_com_g729

+OK

2010-04-04 13:14:35.204281 [INFO] mod_com_g729.c:198 Permitted G.729A channels: 1

freeswitch@internal> 2010-04-04 13:14:35.204281 [CONSOLE] switch_loadable_module.c:900 Successfully Loaded [mod_com_g729]

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 10ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 20ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 30ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 40ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 50ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 60ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 70ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 80ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 90ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 100ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 110ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:184 Adding Codec ‘G729’ (G.729) 8000hz 120ms

2010-04-04 13:14:35.204281 [NOTICE] switch_loadable_module.c:272 Adding API Function ‘g729_status’

 

输入g729_status 或者是g729_info

会显示

freeswitch@internal> g729_status

Permitted G.729A channels: 1

Encoders in use: 0

Decoders in use: 0

这说明授权成功了

 

编辑modules.conf

把mod_g729修改为mod_com_g729

 

g729授权大功告成

 

注意点:

1:因授权是绑定MAC,所以不能使用虚拟盘,要使用实体盘

2:网卡名必须ech开头的.  我装的是centos6.2网卡名是em开头的.这个要修改成ech开头的, 不然授权时会再现 ERROR(null) 类似的提示

 

参考资料:

http://www.freeswitch.org/node/235

http://wiki.freeswitch.org/wiki/Mod_com_g729

http://files.freeswitch.org/g729/

评论已关闭。