- 论坛徽章:
- 0
|
15分钟前,刚成功测试了我们的asterisk的传真功能(三星的传真机直接发送传真给asterisk,asterisk将其存为一张tif的图片),基本没有遇到问题,好爽哦!说真的,遇到了问题我还真的不知道怎么去调试!
我相信这是林(花花)给我带来的好运,呵呵!刚给他打完电话,祝贺他终于可以去当飞行员了!狂聊了一通后,发送传真出奇得顺利!
我也不是牛人,基本是建立在前人的基础上做的,方法呢,在这里:
http://voip-info.org/tiki-index. ... sk+spandsp#comments
具体配置呢,在这里:
http://www.soft-switch.org/installing-spandsp.html
Building and installing the library
Make sure libtiff is installed on your machine. Versions 3.5.7, 3.6.0 and 3.7.1 seem to work OK. There have been several bugs related to FAX document handling in some recent versions of libtiff. Also, some people have had trouble using spandsp because they had more than one version of libtiff on their machine. Take care with this. You will also need libxml2 installed. The FAX facility does not use this, but some other parts of spandsp do. If you are using an RPM based system, such as RedHat or Fedora, you will need the libtiff, libtiff-devel, libxml2 and libxml2-devel RPMs installed.
Use the usual:
./configure
make
make install
process to build the spandsp library. Note that if you use configure in this way, the software will be installed in /usr/local. In this case make sure your /etc/ld.so.conf file has an entry for /usr/local/lib. If you wish the software to be installed in /usr, you should build it with the commands.
./configure --prefix=/usr
make
make install
Next, put app_rxfax.c, app_txfax.c and Makefile.patch in your Asterisk apps directory. Use the command:
patch
within the apps directory, to patch your make file so it will build the new application. If the patching process fails, don't be too surprised. The patch file was generated for a specific revision of Asterisk, and things change. It would be difficult to produce a completely generic patch. If you look through the patch, and the Makefile, I think most people should be able to work out what is needed. Now rebuild and install Asterisk (or rebuild and just copy the two new applcation .so files). Now if you put something like:
exten => 1234567,1,rxfax(/home/steveu/testfax.tif)
in your Asterisk extensions.conf file, a call to "1234567" should invoke the fax facility, to receive a fax to the file /home/steveu/testfax.tif. Alternatively:
exten => 1234567,1,txfax(/home/steveu/testfax.tif)
in your Asterisk extensions.conf file will cause a call to "1234567" to invoke the fax facility to send the file /home/steveu/testfax.tif to a calling fax machine. When sending a fax it is more likely you will be calling out to the remote FAX machine. In this case, make your Asterisk call the far FAX machine, and when it answers do:
exten => 1234567,1,txfax(/home/steveu/testfax.tif|caller)
The addition of "|caller" will make txfax act as a calling machine, rather than an answering machine.
Building the programming documentation
If you wish to build the programming documentation for spandsp, configure spandsp with:
./configure --enable-doc
You need doxygen installed on your machine.
Building the test suite
Most sections of the spandsp library have an accompanying test program in the test directory.
./configure --enable-tests
To build these you will need libaudiofile installed on your machine. To build the modem tests, with the GUI monitoring feature you will need Fltk 1.1.4 and the cartesian plotting module. Fltk may be obtained from http://www.fltk.org. The cartesian plotting module may be obtained from http://134.226.68.29/fltk. However, there is no suitable makefile supplied with that. You can find a version at ftp://ftp.spandsp.org/pub/Fl_Cartesian.tgz which will build as a Linux library. The actual code in both these versions is identical. You need to have Fltk 1.1.4 or 1.1.5 installed before building the plotting library. |
|