Receiving Faxes
Elastix 2.2.0

HOWTO: Not Go Nuts Receiving Faxes in Asterisk!

Probably one of the most frustrating issues surrounding Asterisk PBX is the various forms of fax capabilities that are supported from time to time between certain distributions without seemingly any consideration whatsoever for the poor guy having to maintain the PBX. You would think, now in the 21st Century that we could embrace scanning to e-mail a bit more and finally put this old tired technology to bed once and for all.

In Asterisk 1.4 – 1.6 we had a module called app_fax.so. I liked this module, it was fairly easy to deal with, Elastix 1.x seemed to integrate it well into their system, and there were no licensing issues. As we move to Asterisk 1.8 and beyond, it seems Digium has found another way to take a few dollars out of our pocket in order for us to continue to support this old steam engine. I am in no way upset with Digium, I agree with them, if we are going to have to continue to support this antiquated technology, the consumer is going to have to pay. So, while they give you 1 free fax license, if you want any form of concurrency within your PBX architecture, you will have to purchase additional licenses at $39.00 each.

While the Digium HOWTO use Fax for Asterisk (a.k.a. FFA) is complete – it does not address the nuances that we Elastix 2.2.0 users face. Hence, I am going to combine their Install Guide with my own to give you the most complete picture for setting up your inbound fax to extensions.

1. Retrieve or Purchase FAX License(s) from Digium

Stroll on over to the Digium web site and get your one free fax license and/or purchase concurrent licenses. Remember, you will only need licenses for the number of concurrent faxes you want to receive, not the number of extensions you will want to support. One concurrent license means that you can have one fax session going at one point in time.

2. Download and Execute the Registration Software

I start out the session by sudo’ing to root and then getting all the software I need loaded into the root directory. You will probably want to preserve the register software for use at a later time.
$ sudo su
# cd /root
32-bit » # wget http://downloads.digium.com/pub/register/x86-32/register
64-bit » # wget http://downloads.digium.com/pub/register/x86-64/register
# chmod 500 register
# ./register
At this point you will want to fill in the information as it is requested in the registration process. It involves basic licensing questions.

2. Download and Execute the Benchfax Software

If you happened to have skipped the step above, sudo yourself to root as we did in the section above.
32-bit » # wget http://downloads.digium.com/pub/telephony/fax/benchfax/x86-32/benchfax-1.1.0-x86_32 -O benchfax
64-bit » # wget http://downloads.digium.com/pub/telephony/fax/benchfax/x86-64/benchfax-1.1.0-x86_64 -O benchfax
# chmod 500 benchfax
# ./benchfax
This code will run through your PBX server and execute a number of tests to determine which of the res_fax_digium.so files would be the best one to install on your system. At the time of this writing there were 16 different versions. Once benchfax completes, you will be told what version you should download.

3. The Fax Selector Web Utility

Now head back to the Digium site to use their Fax Selector web utility located at: http://www.digium.com/en/docs/FAX/faa-download.php. Once you have the new software copy it to your PBX server, normally I put it in /usr/src, and tar zxvf res_fax_digium....

4. Copying the needed files and Restarting Asterisk

You will need to copy your res_fax_digium.so file into the appropriate directory based on your system architecture.
32-bit » # cp res_fax_digium.so /usr/lib/asterisk/.
64-bit » # cp res_fax_digium.so /usr/lib64/asterisk/.
If you are coming from an Elastix 2.2 distribution install, res_fax.so is up and running on your machine. If not, you will need to make sure that this module exists in the /usr/lib/asterisk or /usr/lib64/asterisk directory. Now we will need to restart Asterisk so that it can use the new module.
# asterisk -rx "restart when convenient"

5. Verifying Asterisk

Using the CLI we want to verify that Asterisk loads the module correctly and that it sees your license.
# asterisk -vvvvvvr
*CLI> fax show stats
The CLI should return with at least the following information. If you have spandsp.so loaded you will probably have more data shown. But make sure you have the following:

FAX Statistics:
—————

Current Sessions : 0
Reserved Sessions : 0
Transmit Attempts : 0
Receive Attempts : 0
Completed FAXes : 0
Failed FAXes : 0

Digium G.711
Licensed Channels : 1
Max Concurrent : 1
Success : 3
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 : 0
Success : 0
Canceled : 0
No FAX : 0
Partial : 0
Negotiation Failed : 0
Train Failure : 0
Protocol Error : 0
IO Partial : 0
IO Fail : 0

6. The Nuts Part

What is interesting is that if you got this far and you sent a fax to one of your extensions, you will see in the CLI that it seems to be working, but something is happening that is keeping us from receiving the faxes. Nowhere have I found these instructions that cure all ills on the Elastix 2.2.0 install of Fax For Asterisk.
# mkdir /var/spool/asterisk/fax
The fax software is trying to write to this directory and it does not exist. After this you should be able to receive a fax. If not, the next problem is one that you have to manually change the asterisk database stored in MYSQL. The FAX_RX_FROM could be set and it is causing the fax reception script to send the fax from the wrong email address (usually freepbx@gmail.com). You can remove it with the following MySQL command.
mysql> DELETE FROM globals WHERE variable IN ('FAX_RX', 'FAX_RX_EMAIL', 'FAX_RX_FROM');
You will also want to make sure that your email address is set correctly. You will be required to go into the unembedded FreePBX to set the mail options in the FAX Configuration there. Nowhere in Elastix do they give you access to that module’s fields.

Share


Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

comments-bottom

Featured Photos

Asterisk PBX P... Posted by author icon Cary H. Oct 18th, 2011 | no responses
Asterisk PBX P... Posted by author icon Cary H. Oct 16th, 2011 | no responses
Asterisk PBX P... Posted by author icon Cary H. Aug 14th, 2011 | no responses

Random Photos

Asterisk PBX P... Posted by author icon Cary H. Aug 14th, 2011 | no responses
Asterisk PBX P... Posted by author icon Cary H. Aug 10th, 2011 | no responses
Asterisk PBX P... Posted by author icon Cary H. Oct 16th, 2011 | no responses

Top Rated

TurfOutlet.com Posted by author icon Cary H.