I want to send and receive faxes using Asterisk.
Here are the steps I followed to set up Asterisk:
- Installed
spandsp
using:
sudo yum install spandsp-devel
- Loaded the modules
res_fax.so
andres_fax_spandsp.so
. - Enabled
fax_detect
inpjsip.conf
for the incoming context (fax_detect=yes
).
My Dialplan
[from-twilio]
exten => fax,1,NoOp(Detected fax, hooray!)
same => n,ReceiveFAX(/var/spool/asterisk/fax/${UNIQUEID}.tif)
exten => _+X.,1,Verbose(Call from ${CALLERID(num)} to ${EXTEN})
same => n,Answer()
same => n,Ringing()
same => n,Wait(5) ; Wait for 5 seconds before hanging up
same => n,MusicOnHold(default)
Steps I followed to receive a fax:
- Sent a fax using Fax Plus to a number connected to the Asterisk trunk.
Sending a text fax from Fax Plus works fine.
However, when sending a PDF:
In some cases, the packets are completely lost, and the .tif file is not created.
In other cases, some pages are received, but:
Text is mostly correct (but not perfect).
Lines, shapes, and images are blurry or have missing parts.
Could you please help me resolve this issue?