FAX Installation in Asterisk

Home » Asterisk Users » FAX Installation in Asterisk
Asterisk Users 11 Comments

Hi,

Any one give me about FAX in Asterisk.

PSTN====>FXO GATEWAY====>ASTERISK-1.4.27(OR)ASTERISK-1.8.X.X

whenever some one is Fax to PSTN its convert into pdf format….

Help me any links or pdf .. for setup this. ?

Best Regards,

Mahesh Katta
**

11 thoughts on - FAX Installation in Asterisk

  • Am 12.01.2012 12:44, schrieb mahesh katta:

    Hi Mahesh,

    this is my macro in asterisk to handle fax:

    [macro-faxin]
    ; Faxe
    ; ARG1 = eMail-Adresse
    exten => s,1,Verbose(${BOUNDARY} Eingehender Ruf von ${CALLERID(num)})
    exten => s,n,Verbose(${BOUNDARY} BCHANNELINFO ${BCHANNELINFO})
    ; nur verarbeiten, wenn B-Kanal frei ist
    exten => s,n,GotoIf($[${BCHANNELINFO} = 2]?hangup:free)
    exten => s,n(free),NoOp()
    exten => s,n,Set(TO=${ARG1})
    exten => s,n,Set(EXT=${MACRO_EXTEN})
    exten => s,n,Verbose(1,${BOUNDARY} Eingehendes Fax ${CDR(uniqueid)})
    exten => s,n,Set(FAXFILE=/tmp/fax-${TO}-${CDR(uniqueid)}.tif)
    exten => s,n,Set(LOCALSTATIONID=jumping frog)
    exten => s,n,Answer()
    exten => s,n,Wait(3)
    exten => s,n,ReceiveFAX(${FAXFILE},d)

    This is an ugly work-around to handle fax properly becaus I can’t catch
    the hang-up event by the macro itself:

    ;fax oder kein fax, das ist hier die Frage…
    exten => h,1,Verbose(${BOUNDARY} ${EXT})
    exten => h,n,System(/usr/local/bin/fax2mail.sh ${FAXFILE} ${TO})

    And this is the bash script to convert tif to pdf and send it via email
    to my users:

    #!/bin/bash

    FAXFILE=$1
    RECIPIENT=$2
    SUBJECT=”[Fax] Sie haben ein Fax erhalten”
    BODYSUCCESS=/usr/local/bin/bodysuccess.txt
    BODYFAILED=/usr/local/bin/bodyfailed.txt

    PDF=/tmp/fax-`date +”%s”`.pdf

    tiff2pdf $FAXFILE > $PDF

    # Konvertierung okay?
    if [ $? == 0 ]; then

    mutt -s “$SUBJECT” -a $PDF — $RECIPIENT < $BODYSUCCESS # Hats geklappt?
    if [ $? == 0 ]; then

    exit 0

    else

    exit 1

    fi

    else

    mutt -s $RECIPIENT < $BODYFAILED exit 1
    fi

    I hope this helps!

    best regards,
    Ruben

  • WARNING[6982]: pbx.c:1851 pbx_extension_helper: No application ‘ReceiveFAX’
    for extension (macro-faxin, s, 12)
    [Jan 12 18:36:00] == Spawn extension (macro-faxin, s, 12) exited non-zero
    on ‘SIP/gxw-0000000b’
    Best Regards,

    Mahesh Katta
    *BUZZ**WORKS* Business Services Private Limited
    BANGALORE | CHENNAI | HYDERABAD | MUMBAI| DELHI
    222, Arunvihar,Sector-28, Noida 201301
    GSM +91.99993 45699 | Phone +91.12.0431.0581
    Web http://www.buzzworks.com

  • Am 12.01.2012 14:09, schrieb mahesh katta:

    Hi Mahesh,

    I’m running asterisk 1.6.2.21 on Ubuntu 10.4.3 LTS

    On a Debian based linux distribution you need the following packets:

    libtiff-tools
    libtiff4

    To receive fax, you’ll need the ReceiveFAX Application. You can get it
    for personal use directly from digium.com , just search for “FreeFAX for
    asterisk”

    (http://store.digium.com/productview.php?product_code=804-00007)

    best regards,
    Ruben

  • I was search for free license but for this Digium require purchase any
    Hardware then they can provide Free License.
    But I have no Digium Device , I am using Grand stream FXO Gateway and
    Asterisk.1.8.XX .
    I was connected like
    PSTN==>FXOGateway==>Asterisk(FXO configure through IP)

    If anything wrong please correct me.

    Best Regards,

    Mahesh Katta
    **

    On Thu, Jan 12, 2012 at 7:05 PM, Ruben Rögels <
    ruben.roegels@jumping-frog.org> wrote:

  • Am 12.01.2012 18:50, schrieb mahesh katta:

    Hi Mahesh,

    the FreeFax for asterisk is really free and not bound to digium
    hardware, but it is limited to one concurrent fax session. At least you
    should be able to try if fax receiving is possible with this setup. As
    far as I can see, it should work with your setup.

    The URL I posted leads you to the FreeFAX for Asterisk Module.

    best regards,
    Ruben

  • On Fri, Jan 13, 2012 at 1:58 PM, Ruben Rögels <
    ruben.roegels@jumping-frog.org> wrote:

    One more thing sir if I sent at a time multiple fax to this is it receive.
    can you clarify me.
    scenario is I have PRI line of 30 channels. one Boarding no.
    if I send this is it receive the fax at a time with single free license.

  • Remove the Digium FAX module and install SpanDSP. Then the number of
    FAXes you can receive at once will only be limited by the speed of your
    hardware.

    Steve

  • Best Regards,

    Mahesh Katta
    *BUZZ**WORKS* Business Services Private Limited
    BANGALORE | CHENNAI | HYDERABAD | MUMBAI| DELHI
    222, Arunvihar,Sector-28, Noida 201301
    GSM +91.99993 45699 | Phone +91.12.0431.0581
    Web http://www.buzzworks.com

    And which application Receive the fax .I mean “RecieveFax” in Dialplan.
    above Dial plan is it work for this.

    Steve