Details

    • Type: New Feature New Feature
    • Status: Closed
    • Severity: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Labels:
      None
    • Mantis ID:
      10815
    • Regression:
      No

      Description

      sendfax/receivefax applications are replacement for well known txfax/rxfax. These are based on the same idea and also use SpanDSP GPL library by Steve Underwood.

      I hope these can be included in basic Asterisk distribution (or to addons) just to make it easier for people obtaining fax support for Asterisk. Also, this implementation fixes couple of bugs in applications which prevented me using txfax/rxfax out of the box.

      Notes:

      • receivefax does not allow specifying %d in the file name. To me, it is up to dialplan to form really unique file name.
      • debug and answering/calling mode options are specified in a way different from txfax/rxfax
                • ADDITIONAL INFORMATION ******

      Items 1 and 2 from the list below were critical for me because I weren't able using rxfax/txfax without crashing and locking Zap channels. I guess if busy detection works well on your zap channels, you are not affected. Unfortunately busy detection does not work very well on my lines and may take time and since number of Zap lines in my case is very limited, I was affected by every single fax application hung.

      1. In txfax/rxfax all conditions allowing application to leave main loop were related status of the Asterisk channel. That is ast_waitfor/ast_write returning -1 or ast_read returning NULL. That usually means channel is closed. Loop does not terminate when fax sent/received successfully. This means application depends on good busy detection on Zap channels and if that detection does not work properly (as it was in my case), loop can run forever and you won't ever know. sendfax/receivefax have three conditions which terminate main loop:

      • same as in txfax/rxfax (channel is closed, hangup)
      • completion of transmission (either successful or not)
      • watchdog timer - if SpanDSP T30 state does not change for 5 minutes or if the application runs more than 30 minutes in total

      2. sndfax/receivefax verify format of frames before processing. This fixes crash when frame in ulaw/alaw format instead of expected slinear was processed. (This happend because if alaw frame was queued before ast_set_read_format(SLINEAR), the queued frame won't be converted and ast_read will return it as is).

      3. Because for txfax/rxfax the only way when loop is terminated was related to errors with the channel, there was no sense in continuing dialplan execution ever. sendfax/receivefax do return zero if operation was successful while channel is still open so dialplan may continue.

      4. Option parsing in sendfax/receivefax done "in the Asterisk way" using corresponding API so second parameter is a set of single-letter options and parameter delimiter is not hardcoded into application.

      5. In addition to FaxReceived event rxfax used to fire, sendfax also fires FaxSent with exactly the same parameters. Not sure if it is needed feature, but it was easier to implement that not.

      6. FAXPAGES, FAXRESOLUTION and FAXBITRATE variables are set not only by receivefax but also by sendfax. Again, it was just easier to have this feature than to suppress it.

      1. 10815.patch
        33 kB
        Dmitry Andrianov
      2. 10815-2.patch
        33 kB
        Dmitry Andrianov
      3. addons-trunk.patch
        2 kB
        Dmitry Andrianov
      4. app_fax.c
        13 kB
        Dmitry Andrianov
      5. app_fax-451-1.patch
        17 kB
        Igor Goncharovsky
      6. conf-10815.patch
        2 kB
        Dmitry Andrianov
      7. fax_configs_patch.patch
        19 kB
        Badalian Vyacheslav
      8. fax_makefiles_fix.patch
        19 kB
        Badalian Vyacheslav
      9. v2-app_fax.c
        14 kB
        Dmitry Andrianov
      10. v2-app_fax.c.patch
        7 kB
        Dmitry Andrianov
      11. v2-full.patch
        34 kB
        Dmitry Andrianov

        Activity

        Hide
        Badalian Vyacheslav added a comment -

        sorry. have small compile error
        simple delete cham_mobile from Makefile.
        new file uploaded

        Show
        Badalian Vyacheslav added a comment - sorry. have small compile error simple delete cham_mobile from Makefile. new file uploaded
        Hide
        Dmitry Andrianov added a comment -

        Slavon,
        I'm not quite sure what your patch does because my v2-full.patch already has these modifications so you can apply it to "clean" addons trunk without need to do anything else...

        Show
        Dmitry Andrianov added a comment - Slavon, I'm not quite sure what your patch does because my v2-full.patch already has these modifications so you can apply it to "clean" addons trunk without need to do anything else...
        Hide
        Badalian Vyacheslav added a comment -

        dimas i use Brunch. Not trunk. In brunch not have chan_mobile module and other things =)

        Show
        Badalian Vyacheslav added a comment - dimas i use Brunch. Not trunk. In brunch not have chan_mobile module and other things =)
        Hide
        Dmitry Andrianov added a comment -

        I see no reason in posting 1.4 branch patches here because they won't be accepted by Digium anyway. Also, latest version of app_fax.c depends on ast_debug which is only available in trunk.

        Show
        Dmitry Andrianov added a comment - I see no reason in posting 1.4 branch patches here because they won't be accepted by Digium anyway. Also, latest version of app_fax.c depends on ast_debug which is only available in trunk.
        Hide
        Digium Subversion added a comment -

        Repository: asterisk-addons
        Revision: 497

        U trunk/Makefile
        A trunk/app_fax.c
        U trunk/build_tools/menuselect-deps.in
        U trunk/configure
        U trunk/configure.ac
        U trunk/makeopts.in
        U trunk/menuselect-tree

        ------------------------------------------------------------------------
        r497 | tilghman | 2007-12-14 15:53:06 -0600 (Fri, 14 Dec 2007) | 4 lines

        Add faxing application
        Patch by: dimas
        (Closes issue ASTERISK-10380)

        ------------------------------------------------------------------------

        http://svn.digium.com/view/asterisk-addons?view=rev&revision=497

        Show
        Digium Subversion added a comment - Repository: asterisk-addons Revision: 497 U trunk/Makefile A trunk/app_fax.c U trunk/build_tools/menuselect-deps.in U trunk/configure U trunk/configure.ac U trunk/makeopts.in U trunk/menuselect-tree ------------------------------------------------------------------------ r497 | tilghman | 2007-12-14 15:53:06 -0600 (Fri, 14 Dec 2007) | 4 lines Add faxing application Patch by: dimas (Closes issue ASTERISK-10380 ) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk-addons?view=rev&revision=497

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development