How to use Fax for Asterisk - Part 1
Recently, we evaluated fax for asterisk in the process to find a stable fax solution under asterisk.
Ffa is selected because it supports both DAHDI TDM fax and T38 Voip fax. Note that t38 termination is only available when using asterisk 1.6 and above. In asterisk 1.4, we can only use g711 faxing with ffa, a solution which is more vulnerable to network jitters and delays.
We setup an environment as below for evaluating ffa.
l Fc9
l Asterisk 1.6.2.14
l Dahdi with 2-port Digium card
Then we download the free Fax for Asterisk (1-channel) from http://www.digium.com/en/products/software/faxforasterisk.php.
Ffa installation involves below steps.
Create account with Digium
In the first place, we create an account with digium and order free FFA on digium store which would send us a license string afterwards.
Register free fax for asterisk
Cd /usr/src
wget http://downloads.digium.com/pub/register/x86-32/register
Chmod 500 register
./register
This program prompt us to enter the license string obtained from digium.
Determine the build
wget http://downloads.digium.com/pub/telephony/fax/benchfax/x86-32/benchfax-1.1.0-x86_32 -O benchfax
Chmod 500 benchfax
./benchfax
This process examines our system to determine an optimal build and it could take over 10 minutes to complete.
Fax selector
Next, we visit http://www.digium.com/en/docs/FAX/faa-download.php and input the o/s, asterisk version and the 'build' as suggested from benchfax. The fax selector will respond with the corresponding urls of res_fax and res_fax_digium.
Install the required components
wget http://downloads.digium.com/pub/telephony/fax/res_fax/asterisk-1.6.2.0/x86-32/res_fax-1.6.2.0_1.2.1-x86_32.tar.gz
wget http://downloads.digium.com/pub/telephony/fax/res_fax_digium/asterisk-1.6.2.0/x86-32/res_fax_digium-1.6.2.0_1.2.1-
i686_32.tar.gz
tar xzvf res_fax-1.6.2.0_1.2.1-x86_32.tar.gz
cp res_fax-1.6.2.0_1.2.1-x86_32/res_fax.so /usr/lib/asterisk/modules
tar xzvf res_fax_digium-1.6.2.0_1.2.1-i686_32.tar.gz
cp res_fax_digium-1.6.2.0_1.2.1-i686_32/res_fax_digium.so /usr/lib/asterisk/modules
Load res_fax and res_fax_digium in asterisk
Then we can load the two modules in asterisk.
*CLI> module load res_fax.so
*CLI> module load res_fax_digium.so
To verify ffa installation, we can :
*CLI> fax show stats
FAX Statistics:
---------------
Current Sessions : 0
Transmit Attempts : 0
Receive Attempts : 0
Completed FAXes : 0
Failed FAXes : 0
Digium G.711
Licensed Channels : 1
Max Concurrent : 1
Success : 0
Switched to T.38 : 0
Canceled : 0
No FAX : 0
Partial : 0
Negotiation Failed : 0
Train Failure : 0
Protocol Error : 0
IO Partial : 0
IO Fail : 0
Digium T.38
Licensed Channels : 1
Max Concurrent : 1
Success : 0
Canceled : 0
No FAX : 0
Partial : 0
Negotiation Failed : 0
Train Failure : 0
Protocol Error : 0
IO Partial : 0
IO Fail : 0
From the output, we should see that ffa now supports both g711 and t38 faxing.
Note that it is not recommended to specify 'load=>' in modules.conf as long as we have autoload=yes.
In next parts, I would demonstrate how to place fax calls and monitor results.
I have all this correctly but still do not understand how to send or receive faxes.
ReplyDeletehello, I installed the latest version of elastix and of course I miss the fax license, I did everything you wrote but when I write in the CLI "module res_fax.so" I get this message: "Unable to load module res_fax.so. Command 'module load res_fax.so' failed. "Help!
ReplyDeletehello, can you verify that the fax modules exist in /var/lib/asterisk/modules ?
ReplyDeletebtw, elastix comes with hylafax and iaxmodem for fax in/out.