首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 其他相关 >

筹建一个小型的asterisk电话系统 (五、增加efax功能)

2012-09-10 
搭建一个小型的asterisk电话系统 (五、增加efax功能)一、安装依赖包(libtiff & spandsp)$ sudo apt-get inst

搭建一个小型的asterisk电话系统 (五、增加efax功能)

一、安装依赖包(libtiff & spandsp)

$ sudo apt-get install libtiff4 libtiff4-dev

$ mkdir ~/src/asterisk-complete/thirdparty
$ cd ~/src/asterisk-complete/thirdparty
$ wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.6pre21.tgz
$ tar zxvf spandsp-0.0.6pre21.tgz
$ cd spandsp-0.0.6

$ ./configure
$ make

$ sudo make install


二、把spandsp库放入libpath

$ sudo cat >> /etc/ld.so.conf.d/usrlocallib.conf
/usr/local/lib


通过$ sudo ldconfig使其生效


三、重新编译Asterisk添加spandsp支持

$ cd ~/src/asterisk-complete/asterisk/1.8/
$ ./configure
$ make menuselect

确保Resource Modules菜单下的res_fax_spandsp看起来像[*] res_fax_spandsp,保存并退出


$ make
$ make install


四、检查

重新启动asterisk,通过以下命令确认spandsp是否已经工作

*CLI> module show like res_fax_spandsp.so 

Module                         Description                              Use Count
res_fax_spandsp.so             Spandsp G.711 and T.38 FAX Technologies  0
1 modules loaded

如果看到如上结果,则表示spandsp可以工作了,也就是说SendFax() & ReceiveFax()可用在extensions拨号方案中了


五、配置拨号方案

收传真,

[fax-out]exten => s,1,Verbose(2,Set options and transmit fax); some folder where your outgoing faxes will be foundsame => n,Set(faxlocation=/tmp); In production you would probably not want to hardcode the filenamesame => n,Set(faxfile=faxfile.tif)same => n,Set(FAXOPT(headerinfo)=Fax from xxxx.org)same => n,Set(FAXOPT(localstationid=xxxxxx)same => n,SendFax(${faxlocation}/${faxfile})






热点排行