Faxing with Asterisk

Posted by Scott Laird Mon, 29 Mar 2004 05:07:36 GMT

I’ve spent some time working with Asterisk and faxes this weekend. By itself, Asterisk doesn’t know much about faxing. It’s able to spot incoming faxes and yank them out of IVR menus, but that’s about it.

Fortunately, Asterisk is extensible, and someone has written a software faxmodem plugin for it. More specifically, Steve Underwood has written SpanDSP, a more or less complete fax modem, plus a couple Asterisk applications (RxFax and TxFax) for sending and receiving faxes. The applications still need a bit of polishing (as far as I can tell, there’s no way to extract fax metadata from them, like the speed of the connection, the caller’s fax number, and so forth), but they work, and he’s spitting out a couple new releases per week, adding workarounds for increasing numbers of broken fax devices.

I probably wouldn’t trust SpanDSP with all of my company’s faxes today, but it’s improving so quickly that I’ll probably want to revisit that conclusion in a month or two. In preparation for that day, I’m prototyping what it takes to add direct-dialed fax extensions to Asterisk, and then deliver the faxes via email. It turned out to be surprisingly easy.

First, add this to the top of your /etc/asterisk/extensions.conf file:

[macro-faxreceive]
  exten => s,1,SetVar(FAXFILE=/var/spool/asterisk-fax/${UNIQUEID}.tif)
  exten => s,2,DBGet(EMAILADDR=extensionemail/${MACRO_EXTEN})
  exten => s,3,rxfax(${FAXFILE})
  exten => s,103,SetVar(EMAILADDR=defaultuser@example.com)
  exten => s,104,Goto(3)

Next, create a ‘fax’ context in Asterisk and add all of your fax extensions to it. This seems to be the easiest way to have a script run whenever a fax line hangs up, but not run it on every call (hmm, how does this work if you include the fax context into ‘outside’?):

[fax]
  exten => 2201,1,Macro(faxreceive)
  exten => 2202,1,Macro(faxreceive)
  exten => 2203,1,Macro(faxreceive)

  exten => h,1,system(/usr/local/sbin/mailfax ${FAXFILE} \
        ${EMAILADDR} "${CALLERIDNUM} ${CALLERIDNAME}")

Of course, incoming fax calls have to make it to this extension. Here’s part of my ‘outside’ context that hands fax calls off to the fax context:

[outside]
  exten => 2125551212,1,Goto(fax,5555,1)
  exten => fax,1,Goto(fax,2201,1)

The ‘fax’ line will catch any faxes that end up autodetected in the middle of an IVR or voicemail prompt.

SpanDSP receives faxes into TIFF files, but they’re kind of a pain to view, so I’m converting them to PDFs inside of /usr/local/sbin/mailfax:

#!/bin/sh

FAXFILE=$1 
RECIPIENT=$2
FAXSENDER=$3

tiff2ps -2eaz -w 8.5 -h 11 $FAXFILE | 
  ps2pdf - |
  mime-construct --to $RECIPIENT --subject "Fax from $FAXSENDER" \
    --attachment fax.pdf --type application/pdf --file - 

There’s just one final step. Rather then code extension-to-email mapping directly into extensions.conf, I added a lookup via Asterisk’s internal database. So, you need to add DB entries for each extension. This is pretty easy; from the Asterisk CLI just type:

*CLI> database put extensionemail 2202 bob@example.com

You can verify that it worked by running ‘database show’.

One comment on fax and VoIP: conventional wisdom holds that the two don’t mix. At the very least, you can’t send faxes over a compressed VoIP link, although uncompressed (the G.711 ULAW codec in Asterisk) will probably work over a LAN. I haven’t tested it. In general, stick to faxing over traditional telephone interfaces, like POTS lines, ISDN, or T1s, and you’ll be happier.

Two final things: First, I’m fairly new to Asterisk. There’s probably an easier way then the way I’ve done it here. See the comment about ‘include =>’ above. Second, I’m kind of trusting Asterisk not to put nasty shell metacharacters into the parameters that I’m passing to mailfax. That’s probably not a good assumption; consider auditing the Asterisk code a bit, or just remove the caller ID name from the call to mailfax.

Posted in  | Tags , ,  | 54 comments

Comments

  1. Guan Yang said about 1 month later:

    What would you use to actually send faxes via Asterisk and spandsp? Afaict, app_txfax relies on a fax machine actually dialing in (is this called fax polling?) in order to transmit faxes.

    If I have a TIF file that I’d like faxed, how can I use Asterisk/spandsp to dial a POTS number and transmit the fax?

    Guan

  2. Scott Laird said about 1 month later:

    Newer versions of spandsp include a version of txfax that can handle dialing out as well as polling.

  3. izo said 2 months later:

    I tried faxing over G711 and internet and I failed i tried both alaw & ulaw. There was no packet loss. I tried different speeds inlcuding 2400 but all faxes failed :/. So if you know good solution for FoIP i’ll be really happe to see it.

  4. SWS said 2 months later:

    Have you ever posted your entire config files for asterisk? A bunch of us are trying to get servers set up, but I’ve been unable to find a site which contains complete setups to help one learn the format/flow, etc…

  5. Scott Laird said 2 months later:

    I haven’t posted them all, partly because there’s old cruft in them that I need to clean up, and partly because there are a couple security-ish things that I’d rather not disclose. However, if people really care, there’s no reason that I can’t clean them up and post them minus a couple lines.

  6. Greg Hulands said 3 months later:

    Have you tried to set up asterisk with cups so that all mac os x clients on the network could use asterisk as “Shared Printer” for faxing?

    I am about to begin setting up an asterisk system in our small business to route all our out going calls via voip and thought that been able to have every mac been able to fax directly from the desktop to asterisk which can then decide how it wants to route the fax (pots or voip) would be good.

  7. Nathan Ward said 5 months later:

    Fax over IP is usually done with T.38.

    http://www.voip-info.org/wiki-T.38

  8. Scott Laird said 5 months later:

    Yeah, but no one has written a T.37/T.38 module for Asterisk yet. So we have to make do with what we have.

  9. Niles Ingalls said 6 months later:

    Great information! I modified your mailfax script slightly to:

    !/bin/sh

    FAXFILE=$1 RECIPIENT=$2 FAXSENDER=$3

    tiff2pdf -p letter $FAXFILE | mime-construct –to $RECIPIENT –subject “Fax from $FAXSENDER” \ –attachment fax.pdf –type application/pdf –file -

  10. Dave Cotton said 8 months later:

    Thanks for the idea .

    I modified your mailfax script slightly more to:

    !/bin/sh

    FAXFILE=$1 RECIPIENT=$2 FAXSENDER=$3 FAXID=date +%j%k%M%S.pdf

    tiff2pdf -p letter $FAXFILE | mime-construct –to $RECIPIENT –subject “Fax from $FAXSENDER” \ –attachment $FAXID –type application/pdf –file -

    Each file then has a unique ID.

  11. Waldek said 9 months later:

    What kind of software you use for send FAX (TIF or MSWord) from PC via VoIP to Asterisk?

  12. Waldek said 9 months later:

    What kind of software you use to send FAX document like TOF or MSWord from PC via IP to Asterisk?

  13. Waldek said 9 months later:

    What kind of software you use to send FAX document like TIF or MSWord from PC via IP to Asterisk?

  14. Waldek said 9 months later:

    What kind of software you use to send FAX documents like TIF or MWord from PC via IP to Asterisk?

  15. shiran said 9 months later:

    Can some one tell me how to solve this:

    pbx.c:1280 pbxextensionhelper: No application ‘system(/usr/local/sb in/mailfax ${FAXFILE} ' for extension (fax, h, 1)

  16. Scott Laird said 9 months later:

    shiran, which version of Asterisk are you using, and what platform are you running it on? Look in /usr/lib/asterisk/modules and see if you have a file called ‘appsystem.so’. Next look at /etc/asterisk/modules.conf and see if there’s a line that looks something like ‘noload => appsystem.so’. If the line exists, then remove it and restart Asterisk. If app_system.so is missing, then you’ll probably need to reinstall Asterisk.

  17. Olivier said 11 months later:

    Another modification on the script for use without mime-construct :

    !/bin/sh

    FAXFILE=$1 RECIPIENT=$2 FAXSENDER=$3

    tiff2ps -2eaz -w 8.5 -h 11 $FAXFILE | ps2pdf - | uuencode fax.pdf | mail -s “Fax from $FAXSENDER” $RECIPIENT

  18. Chris Slaght said 11 months later:

    shiran, I ran into the same problem you did. Take the ‘' out and make it one long command line.

  19. Chris Slaght said 12 months later:

    I ran into this problem with outlook where the attached file was a ‘.dat’ file instead of a .tif.. Hope it helps someone.

    http://lists.digium.com/pipermail/asterisk-users/2005-February/087949.html

  20. ilcalmo said 12 months later:

    Nice page…. It has been so helpful to configure fax line on asterisk. The problem I have now is that I cannot receive any fax, due to the following errors on asterisk.log:

    DCS with final frame tag In state 9 Coarse carrier frequency 1705.06 (4) Coarse carrier frequency 1699.97 (66) Training error 0.369058 Training succeeded (constellation mismatch 0.394736) Coarse carrier frequency 1749.63 (6) Training error 695.669785 Training failed (convergence failed) Coarse carrier frequency 1699.99 (66) Training error 0.409848 Training succeeded (constellation mismatch 0.483335) Coarse carrier frequency 1712.74 (4) Training error 672.459483 Training failed (convergence failed) Coarse carrier frequency 1699.96 (66) Training error 0.415742 Training succeeded (constellation mismatch 0.322563) Start rx document Start rx page - compression 2 Coarse carrier frequency 1761.39 (6) Training error 725.295118 Training failed (convergence failed) Coarse carrier frequency 1799.50 (4)

    I tried to use ulaw and alaw codec, but up to now I get always the same error receiving the fax.

    Asterisk connect to another sip server, forwarding the public phone number to the fax extension. I have the line in sip.conf:

    register => usr:pwd@sip.messagenet.it:5061/fax

    this line forward my public phone number on my asterisk server.

    Is anyone available to help me? Thanks.

  21. Muiz said 12 months later:

    You should make the following adjustment to Dave Cotton’s script or it won’t work between midnight and 9:59am. Make sure you change the %k to %H. See below.

    !/bin/sh

    FAXFILE=$1 RECIPIENT=$2 FAXSENDER=$3 FAXID=date +%j%H%M%S.pdf

    tiff2pdf -p letter $FAXFILE | mime-construct –to $RECIPIENT –subject “Fax from $FAXSENDER” \ –attachment $FAXID –type application/pdf –file -

  22. lane said about 1 year later:

    Where is this mime-construct program? I can’t seem to locate it on cpan or dejanews…

  23. Scott Laird said about 1 year later:

    You can find mime-construct at http://search.cpan.org/~rosch/mime-construct-1.9/

  24. Paul Harrington said about 1 year later:

    Thanks Scott that helped me get going. Also got txfax working by placing config files in the /var/spool/outgong directory.

    You can now also set up a email2fax gateway using:

    http://www.inter7.com/?page=astfax

  25. Chris said about 1 year later:

    I haven’t been able to receive a fax. It fails during the training. Any suggestions?

  26. Fernando said about 1 year later:

    I can only get one page per call, even that the user is sending more than one… its there away that macro generates a other file or how do you work this out?

  27. Chris said about 1 year later:

    I found the errors in the training was because of the clone FXO card I was using. Now it receives a fax fine, but the Tif is all black.

  28. Scott Laird said about 1 year later:

    The TIFF is all black? What are you viewing it with? Not all TIFF-reading programs can handle G3-encoded TIFFs.

    Scott

  29. Chris said about 1 year later:

    I didn’t think of that. I tried windows image viewer and Paintshop pro. Neither one works.

    The file is 16,248 bytes. I have AMP installed. The PDF created is 1,097 bytes and Abobe has an error when I try to open it.

    When I receive a fax and try tiff2pdf on the tiff it gives me errors

    tiff2pdf: Error on decoding strip 0 of 1115317425.26.tif.

    tiff2pdf: An error occurred in converting TIFF 1115317425.26.tif to PDF 1115317425.26.tif.pdf.

  30. Chris said about 1 year later:

    I compiled libtiff 7.2.2 and it seems to be working fine. I’m using 0.0.2PRE6 of SpanDSP. Is there a good reason to upgrade to Pre17?

  31. Jason said about 1 year later:

    What kind of hardware do u need to send the call throught to get this to work?? I’m trying to get it to work through my spirua 2100

  32. mangoo said about 1 year later:

    I can receive faxes, but they look terribly… When I fax an A4 page, what I sometimes get is 5 cm long image… I never got a good fax.

  33. Scott Laird said about 1 year later:

    95% of the time, garbled faxes are caused by transmission errors, usually frame slips in Asterisk’s zap drivers. According to spandsp’s author, there are a number of things that you can do, but most of them involve things like making sure that you aren’t sharing interrupts, changing PCI latency timers, and moving slots.

  34. Ronaldo said about 1 year later:

    Weirdly, I only get the first 1cm of the page in tif. I never obtained another result. Already tried to change the version of libtiff (.71), spandsp (pre18), asterisk (CVS) and nothing! The quality of image on that small band (1cm) is perfect. :(

  35. Miguel said about 1 year later:

    I have the same problem.

    >Weirdly, I only get the first 1cm of the page in tif. I never obtained another result. >Already tried to change the version of libtiff (.71), spandsp (pre18), asterisk (CVS) and nothing! >The quality of image on that small band (1cm) is perfect. :(

  36. Miguel said about 1 year later:

    I have the same problem.

    >Weirdly, I only get the first 1cm of the page in tif. I never obtained another result. >Already tried to change the version of libtiff (.71), spandsp (pre18), asterisk (CVS) and nothing! >The quality of image on that small band (1cm) is perfect. :(

  37. Dominik said about 1 year later:

    Can anyone help? I installed acutal spandsp and asterisk on 2 systems (suse 9.1 and fedora core 1) - on both systems the same error by sending a fax:

    DIS with final frame tag In state 10 Start tx document CFR with final frame tag In state 4 Start tx page 0 Start tx page 1 RTN with final frame tag In state 14 free(): invalid pointer 0x80f3c80! Segmentation fault Ouch … error while writing audio data: : Broken pipe Warning, flexibel rate not heavily tested!

    Can anyone help? Best regards! Dominik

  38. Thomas Rankin said about 1 year later:

    How do you send outgoing faxes a-la hylafax?

    (most interested in being able to send through windows, I quite like the idea about a cups printer being available to print to, but how do you get the header and phone number information to a remote printer?)

    TIA for any help

  39. Scott Laird said about 1 year later:

    There is supposedly work afoot to glue Hylafax and txfax together. I send so few faxes that it’s easier to just print them and feed them into the machine, so I haven’t really been keeping up on this. Sorry.

  40. eddie said about 1 year later:

    I get email from root@mydomain.com when mime-construct sends email. I prefer to receive it from fax@mydomain.com. How do I do this? Please advice.

  41. Lee Archer said about 1 year later:

    Anyone know what this means and how to fix it?

    Changed from phase 1 to 4 DIS: Prefer 256 octet blocks Can receive fax Supported data signalling rates: V.27ter and V.29 R8x7.7lines/mm and/or 200x200pels/25.4mm 2D coding Scan line length: 215mm Recording length: Unlimited Receiver’s minimum scan line time: 0ms at 3.85 l/mm: T7.7 = T3.85 R8x15.4lines/mm Minimum scan line time for higher resolutions: T15.4 = T7.7 North American Letter (215.9mm x 279.4mm) North American Legal (215.9mm x 355.6mm)

    DIS: 80 00 ce f4 80 80 81 80 80 80 18 HDLC underflow in state 9 Changed from phase 4 to 3 Slow carrier up Slow carrier down Slow carrier up Slow carrier down

    That’s just a snippet. Asterisk 1.0.9 with spandsp pre19.

    Regards

    Lee

  42. ardg said about 1 year later:

    I can’t receive any fax document from my Panasonic KX-FT25. It hangup during negotiation; but, I can send a fax from asterisk to my fax machine. I’m using spandsp 0.02pre11 and libtiff-3.5.7-11. Any idea ??

  43. Constantine said about 1 year later:

    greetings -

    I have latest spandsp and libtiff installed and there is a problem with incoming faxes.

    Basically, it looks like app_rxfax can’t tell correctly where there is a border of the page in a fax and it sometimes produces faxes where border of the page comes in the middle. For one example, you can explore http://www.intermedia.net/test123/fax20051012-223533.tif. This happens in about 30% of the faxes.

    does anyone has an idea what’s going on here?

    Thanks

    -c

  44. Brett Sutton said about 1 year later:

    AsterFax uses spandsp to send faxes from an email. http://asterfax.sourceforge.net

    I thought this would be of interest.

    AsterFax provides an email (SMTP) Fax gateway for the transmission of faxes using Asterisk.

    Sending a fax using AsterFax and Asterisk is as simple sending a normal email message. AsterFax allows you to compose a normal email message, set the ‘To’ address to the phone number you want the fax sent to and click send. Alternatively if you want better control of the formatting of the fax or you have an existing document then you can attach the document to an email message and AsterFax will send the document as a fax. AsterFax supports a growing list of file types such as Tiff, PDF and postscript. Support for MS-Word, MS-Excel and the OpenOffice suite of file formats is due in the next release (beta 4) (plus about 20 others).

    AsterFax also supports a preview mode so that you can check the fax before it is transmitted. Simply replace the phone number with the word ‘preview’ and AsterFax will send the intended fax (rendered as a Tiff) back to you for previewing.

    Any errors are also sent back to your email inbox.

    For the technically minded AsterFax is written in pure Java and utilizes the Asterisk Manager API to submit jobs. AsterFax uses external applications to perform the conversion of attachments to the required tiff format for transmission. AsterFax can be extended via a simple xml configured file to convert and transmit any other file format providing a suitable conversion application is available.

    AsterFax includes a simple standalone SMTP gateway which handles the receipt of emails. AsterFax is not a complete SMTP gateway in that it will only accept messages which are to be faxed. Any other messages will result in an error. AsterFax does not forward SMTP messages to other SMTP servers (except in the case of error messages).

    AsterFax requires Asterisk with the spandsp (txfax, rvfax) extensions.

  45. Arnold Phaisano said about 1 year later:

    I sent legal size paper faxes; but they are shortened to regular size. I do not know how to have AsterFax to generae the pdf file with the right size of the fax document. I don’t think that the problem is with the transmitting machine. The fax machine is brand know. I read the manual and it does not say anything about adjusting for papar size.

    Please help!!

  46. Brett Sutton said about 1 year later:

    Version 1.0 Beta 7 onwards has support/documentation for setting the papersize.

  47. null said about 1 year later:

    Asterfax provides an Email to Fax gateway for the transmission of faxes using Asterisk.

    Asterisk is an Open Source PBX (or PABX) integrating PSTN telephone lines and VOIP into a single solution, providing all of the functionality of a high end PBX; and best of all its free! AsterFax builds on the services provided by Asterisk to provide a full fledged email based Fax Gateway.

    What that means is that with AsterFax and Asterisk you can send faxes from your desktop using your standard email client without have to install any software on your desktop.

    AsterFax can translate a normal email message into a fax message. You simply enter the destination phone number in the ‘To’ address, compose your email message and click send. Its that easy.

    For more formal correspondence AsterFax also supports a growing number of file formats such as PDF, Tiff, Postscript, MS-Word and OpenOffice Writer. You can either attach the file to your email message or for applications such as MS-Word and OpenOffice you can fax directly from the applications by using the ‘Send Email’ option. The resulting email is sent as a fax message.

    Beta 7 was introduced to allows AsterFax to deal with a number of usage scenarios identified from user feed back. Only one of the features oringally slated for Beta 7 has been included in this release (transmission of unsent faxes after a restart) all other features slated for beta 7 have now been pushed back to beta 8.

    The main points of Beta 7 are: Improved documentation. Multiple attachments are now handled and all transmitted rather than just the first attachment. Fix for NullPointerException when sending an HTML Cover Page. Automatic setting of execute permissions on all scripts. Audit Log no includes a page count. The Page size (Letter, A4 etc) can now be set via AsterFax.xml. AsterFax can now be successfully run in the background. A new experimental Web interface for sending faxes.

  48. Helen Cunningham said about 1 year later:

    http://asterfax.sourceforge.net

  49. bill said about 1 year later:

    I have this same issue but only from some fax machines. Could it be a training problem?

  50. Helen Cunningham said about 1 year later:

    4th March 2006 AsterFax support moved to Asterisk IT I seem to recall an advert for a razor where the promoter makes the claim, “I liked the razor so much I bought the company’. Well the folks here at Noojee IT are so excited about the potential of Asterisk that we have formed a new company dedicated to providing Asterisk related services and products. Asterisk Integrated Telephony (Asterisk I.T.) has just been formed in Australia and will be providing Consulting, Integration, Support and sales of Asterisk related services and Products. It is our belief that at this time Asterisk I.T. is the only company in Australia dedicated to providing Asterisk products and services. As Asterisk I.T. is focusing on Asterisk, Noojee I.T. will be getting back to normal business (Software development and Networking Services). As such it seems appropriate to move support for AsterFax across to Asterisk I.T. No need to fear as the same team will still be supporting Asterfax as wwww.asteriskit.com.aue have all moved across to Asterisk I.T.

    Please note the Asterisk I.T. web site is still a work in progress and will change rapidly over the next month or so.

  51. Helen said over 2 years later:

    ‘AsterFax’ >

    Press release

    We are pleased to announce the release of AsterFax 1.0 rc2.

    AsterFax provides an Email to Fax gateway for the transmission of faxes using Asterisk.

    Asterisk is an Open Source PBX (or PABX) integrating PSTN telephone lines and VoIP into a single solution, providing all of the functionality of a high end PBX; and best of all its free!

    AsterFax builds on the services provided by Asterisk to provide a full fledged email based Fax Gateway.

    With AsterFax you can send and receive faxes directly from your existing email client without installing any desktop software.

    AsterFax can translate a normal email message into a fax message. You simply enter the destination phone number in the ‘To’ address, compose your email message and click send. Its that easy.

    For more formal correspondence AsterFax also supports a growing number of file formats such as PDF, Tiff, Postscript, MS-Word and OpenOffice Writer. You can either attach the file to your email message or for applications such as MS-Word and OpenOffice you can fax directly from the application by using the ‘Send Email’ option. The resulting email is sent as a fax message.

    For incoming faxes AsterFax support routing of emails based on a Direct In Dial (DID) number. Which means that every person in an organization can have their own private fax number. AsterFax DID to email address mappings can be stored in a simple configuration file or be pulled from an LDAP repository or virtually any Database.

    This release includes a number of install process improvements and minor bug fixes. The install process now creates all the working directories.

    The compression scheme used in creating TIFF images has been changed to group 4 compression improving the ability to preview faxes using third party TIFF viewers.

    The DefaultFaxHandler has been fixed to handle both inbound and outbound faxes.

    Future releases will further improve the install process, provide an init script. We’re also looking at providing the RPMs in a public yum repository.

    You can download AsterFax from sourceforge at http://asterfax.sourceforge.net and click the ‘Downloads’ link on the right hand side.

    Enjoy! The AsterFax Team http://www.asteriskit.com.au

  52. Zaka said over 2 years later:

    I have following issue with receiving fax from Samsung sf2000 fax machine. Faxes with other machine works OK;

    I am running asterisk 1.0.10 with spandsp-0.0.2pre26 on zaptel 1.0.10.

    The following is the log Jun 26 09:20:03 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW HDLC carrier up Jun 26 09:20:03 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW HDLC carrier down Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW HDLC carrier up Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW HDLC carrier down Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW HDLC carrier up Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Changed from phase 1 to 4 Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW >>> DIS: Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: 80 Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: 00 Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: ce Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: f4 Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: 80 Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: 80 Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: 81 Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: 80 Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: 80 Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: 80 Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: 18 Jun 26 09:20:06 DEBUG[14882]: apprxfax.c:70 spanmessage: Jun 26 09:20:06 DEBUG[14882]: chanzap.c:4059 ztread: DTMF digit: f on Zap/1-1 Jun 26 09:20:06 DEBUG[14882]: chanzap.c:4101 ztread: Fax already handled Jun 26 09:20:07 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW HDLC underflow in state 9 Jun 26 09:20:07 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Changed from phase 4 to 3 Jun 26 09:20:07 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW HDLC carrier up Jun 26 09:20:07 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW HDLC framing OK Jun 26 09:20:07 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW HDLC carrier down Jun 26 09:20:08 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW HDLC carrier up Jun 26 09:20:08 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW HDLC framing OK Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW <<< TSI: Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 43 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 20 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 20 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 20 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 20 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 20 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 20 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 20 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 20 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 20 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 38 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 30 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 30 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 30 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 35 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 32 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 34 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 31 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 37 Jun 26 09:20:09 DEBUG[14882]:apprxfax.c:70 spanmessage: 38 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: 30 Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW TSI without final frame tag Jun 26 09:20:09 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Remote fax gave TSI as: “” Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW <<< DCS: Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: 83 Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: 00 Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: 86 Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: a0 Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: 80 Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: 80 Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: 00 Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW DCS with final frame tag Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW In state 9 Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Get at 9600bps, modem 1 Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Changed from phase 3 to 5 Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier up Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier down Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier up Jun 26 09:20:10 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier trained Jun 26 09:20:12 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier down Jun 26 09:20:12 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Trainability test failed - longest run of zeros was 903 Jun 26 09:20:12 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW >>> FTT: Jun 26 09:20:12 DEBUG[14882]: apprxfax.c:70 spanmessage: 44 Jun 26 09:20:12 DEBUG[14882]: apprxfax.c:70 spanmessage: Jun 26 09:20:15 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier up Jun 26 09:20:15 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier training failed Jun 26 09:20:17 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier down Jun 26 09:20:17 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier up Jun 26 09:20:17 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier trained Jun 26 09:20:19 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier down Jun 26 09:20:19 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Trainability test failed - longest run of zeros was 88 Jun 26 09:20:19 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW >>> FTT: Jun 26 09:20:19 DEBUG[14882]: apprxfax.c:70 spanmessage: 44 Jun 26 09:20:19 DEBUG[14882]: apprxfax.c:70 spanmessage: Jun 26 09:20:22 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier up Jun 26 09:20:22 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier training failed Jun 26 09:20:24 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier down Jun 26 09:20:24 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier up Jun 26 09:20:24 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier trained Jun 26 09:20:26 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier down Jun 26 09:20:26 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Trainability test failed - longest run of zeros was 955 Jun 26 09:20:26 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW >>> FTT: Jun 26 09:20:26 DEBUG[14882]: apprxfax.c:70 spanmessage: 44 Jun 26 09:20:26 DEBUG[14882]: apprxfax.c:70 spanmessage: Jun 26 09:20:29 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier up Jun 26 09:20:29 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier training failed Jun 26 09:20:30 DEBUG[14882]: apprxfax.c:70 spanmessage: FLOW Non-ECM carrier down

    Please can you help me what is wrong.

  53. scarlett said over 2 years later:

    Hi! can you tell me the structure of the fax system which build with Asterisk and AsterFax? Do you have any useful material about AsterFax? How can I architecture the fax system with AsterFax and Asterisk?

  54. Keven Gu said over 2 years later:

    Guan, using call file or Originate, callback a fax machine and set a rxfax context in dialplan.

Comments are disabled