Asterisk Fax In Debian

Home » Asterisk Users » Asterisk Fax In Debian
Asterisk Users 7 Comments

Hello. i am running debian 6 with asterisk 11.4. The system has exim4 to send to email the voicemails. i would like to get rid of the analog fax machine and use asterisk to send/receive faxes. I do have a PSTN line with a SPA3102 adapter to interface it to asterisk. The number of the PSTN line is dedicated to faxing only. So i would like to:
-receive faxes to asterisk and then send it as PDFs to an email address
-Send from my PC a fax directly.

is there any guide on how to do that since i got lost with all of it?

7 thoughts on - Asterisk Fax In Debian

  • Hi. I have seen these kind of instructions but there i lost it. here is what i got. Asterisk has a spa3102 to interface the PSTN line. It works smoothly and i got in/outgoing calls. i do have the codec to g711alaw (since i am in Europe). on the fxs port of the spa3102 i had the fax machine up to now and it worked. in the asterisk i installed spandsp and recompiled asterisk. i have losted though with the config to receive/send faxes.

  • I did install hylafax and iaxmodem. Everything installed correctly and the services do run OK. The problem is the sip.conf and extensions.conf. I do not know how to link the PSTN number 123456 to work as fax and then send as email.

  • Let 123456 be your fax number, iaxmodem0 the account name of your IAX
    modem (configured in iax.conf), then in extensions.conf you would have something like


    exten => 123456,1,Verbose(1,Incoming fax…)
    same => n,Dial(IAX2/iaxmodem0,40)
    same => n,Hangup()

    and for outgoing facsimiles in context [fax-out]

    exten => _X.,1,Verbose(1,Outgoing fax…)
    same => n,Dial(…${FILTER(0-9,${EXTEN})},40)
    same => n,Hangup()

    Email sending is configured inside Hylafax.


  • I would go with HylaFAX. FAX is an art with any VoIP solution. The best art I have done and seen turned out to use HylaFAX.

    Thanks, Steve Totaro

  • I am having an issue with iax2 for the fax. when i am issuing iax2 show peers, i am getting
    *CLI> iax2 show peers Name/Username Host Mask Port Status
    Description iaxmodem/iaxmod (null) (D) 0
    1 iax2 peers [0 online, 0 offline, 1 unmonitored]

    it is not attached even to

    is there a workaround?

  • Enable logging and see what happens when you start and stop the iaxmodem. Obviously, it doesn’t register, but the messages might be helpful. Since iaxmodem is somewhat older, you might have to disallow call tokens in iax.conf.