Upgrade 3CX to v18 and get it hosted free!

Asterisk and faxes

Author image

Howto use Asterisk for incoming faxes

With a ISDN CAPI4Linux card

If you have an ISDN card supporting CAPI, there is a driver that connects the Hylafax fax server directly to an Asterisk ISDN connection.

With a Digium card

If you have a Digium card you can send it down that, just put the following in your extensions.conf
exten => fax,1,Dial(Zap/5)

If we get a fax, send it out on zap/5 which is an FXS off a TDM400P card – the FXS connected
to your fax machine.

This way all our inbound numbers are both voice and fax, simple and works…

However, this might not work reliable nowadays. I have noticed it in person and also Digium is making clear their boards should not be used for faxes.

Fax Detection with IAX and SIP

If you are trying to detect faxes over IAX, SIP, or for that matter any type of channels, Newman has created NVFaxDetect and updated BackgroundDetect as NVBackgroundDetect for that purpose. We have had near perfect results on decent IAX connections using ULAW/ALAW. Fax detection utilizes Asterisk DSP and works in the same way — once detected, faxes are sent to the fax extension. See Asterisk fax for example fax detection scripts.

Making Outlook Work With Mime-Construct

We used Thunderbird when testing the email and the attached pdf files worked very well. However, when we went “live”, some people complained that the attachments in outlook were named <<subject>>.dat instead (for example) of 123456.pdf

Having looked into the mime-construct script, we noticed a subtle difference between working Outlook attachments and Thunderbird. The differences are shown below :

left is the original mime-construct, right is our modified version

< $part_header .= “Content-Disposition: attachment; filename=”
> $part_header .= “Content-Disposition: inline; filename=”

< $p .= cont “Content-Type: $type\n”
> $p .= cont “Content-Type: $type;\n name=” . token_quote($arg) . “\n”

Outlook now names the attachment correctly, and Thunderbird also seems to work just as well with the changes.

Update — If the above changes do not fix your mime-construct file, verify the version by going to the unix cli (use keyboard or PuTTY) and type “mime-construct –version”. I found that even if I updated the script above, It made it to where the attachment wouldn’t come through at all. I checked my version and I had v1.8. I searched and found that there was a slightly newer version 1.9, so I tried it and it seemed to solve my problems.

Procedure:
1. Goto /usr/bin/
2. Rename “mime-construct” to “mime-construct.old”
3. Copy the 1.9 code from https://search.cpan.org/src/ROSCH/mime-construct-1.9/mime-construct
4. Re-create mime-construct and paste the code. Be sure not to get the comments at the bottom, stop before _END_
5. “chmod 555 mime-construct”

Now my faxes were attached to my e-mails


Back to Asterisk tips and tricks


Article Reviews

Write a Review

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

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.