Hylafax Inbound Faxing

Discussion in 'General' started by jasong, Aug 22, 2009.

  1. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    I installed Avantfax because there is no way to send faxes from the elastix fax module. After installing avantfax I had all kinds of issues with the Saving of Inbound and Outbound faxes. I finally got it to save my outbound faxes by adding a couple lines to the ttyIAX1.conf file. But it still does not process the inbound faxes in the doneq, I see the tiff files in the doneq, but none in the /var/www/html/faxes/recvd. I got frustrated and uninstalled Avantfax and now the whole thing is messed up. The Avantfax uninstall does not reverse all the changes the install makes. Is there a way to reinstall Hylafax so the conf files are back to stock? When I do a yum remove hylafax it is trying to remove a lot of dependencies that I don't want removed.

    PLEASE PLEASE help, I don't want to have to reinstall and start over.
     
  2. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    Here is some additional info from the hylafax log for an incoming fax.

    Aug 21 19:59:59.71: [10099]: RECV send MCF (message confirmation)
    Aug 21 19:59:59.71: [10099]: RECV FAX (000000035): from pinTraxx, page 1 in 0:15, INF, 3.85 line/mm, 2-D MMR, 9600 bit/s
    Aug 21 19:59:59.71: [10099]: RECV FAX (000000035): recvq/fax000000015.tif from pinTraxx, route to <unspecified>, 1 pages in 0:16
    Aug 21 19:59:59.71: [10099]: <-- [9:AT+FRH=3\r]
    Aug 21 20:00:01.25: [10099]: --> [7]
    Aug 21 20:00:01.70: [10099]: --> [10:NO CARRIER]
    Aug 21 20:00:01.70: [10099]: MODEM No carrier
    Aug 21 20:00:01.70: [10099]: <-- [9:AT+FRS=7\r]
    Aug 21 20:00:02.29: [10099]: --> [2]
    Aug 21 20:00:02.29: [10099]: <-- [9:AT+FTH=3\r]
    Aug 21 20:00:02.31: [10099]: --> [7]
    Aug 21 20:00:02.31: [10099]: <-- HDLC<3:FF C8 58>
    Aug 21 20:00:02.31: [10099]: <-- data [3]
    Aug 21 20:00:02.31: [10099]: <-- data [2]
    Aug 21 20:00:03.38: [10099]: --> [2]
    Aug 21 20:00:03.38: [10099]: RECV send CRP (command repeat)
    Aug 21 20:00:03.38: [10099]: <-- [9:AT+FRH=3\r]
    Aug 21 20:00:03.94: [10099]: --> [10:NO CARRIER]
    Aug 21 20:00:03.94: [10099]: MODEM No carrier
    Aug 21 20:00:03.94: [10099]: MODEM input buffering enabled
    Aug 21 20:00:03.94: [10099]: RECV FAX: bin/notify-elastix.php "recvq/fax000000015.tif" "ttyIAX1" "000000035" "" "6193506259" "6193506259" "<NONE>" "s"
    Aug 21 20:00:03.95: [10099]: RECV FAX: end
    Aug 21 20:00:03.95: [10099]: SESSION END
     
  3. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    Well I figure I will update as i go along. I did manage to get the faxrcvd.php to run with the following command

    Code:
    cd /var/spool/hylafax; for i in `ls recvq/*`; do bin/faxrcvd.php $i ttyIAX1; done
    It added the fax to the Fax Visor, and sent me an email notification. For some strange reason it still does not automatically run when a fax is received. I will keep playing with it, if someone happens to read this and can see something obvious i am missing please inform me.

    P.S. here is what I changed in the faxrcvd.php file to get the command to file to run.

    Code:
    //tiff2pdf ($tiff_file, $pdffile);
    echo exec("tiff2pdf $tiff_file -o $pdffile");
     
  4. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    Ok so i figured out I need to have

    Code:
    FaxrcvdCmd:     bin/faxrcvd_
    in /var/spool/hylafx/etc/config.ttyIAX1

    The reason for the _ is because it seems as if the last character is getting cut off. So the _ is my fix for that.

    Now the problem is the PDF in the file does not have read permissions. :angry:

    I really don't know much about php code, and I don't speak Spanish nor read it :) so I will post what i have in faxrcvd, and maybe someone can fix for me.

    Code:
    #!/usr/bin/php
    <?php
        require_once "includes/functions.php";
        require_once "includes/config.php";
        
        /**********************************************
         *         1) OBTENGO INFORMACION             *
         **********************************************/
    
        // check for proper arguments
        if ($_SERVER['argc'] < 3) {
            echo $_SERVER['argv'][0]." file devID commID error-msg CIDNumber CIDName\n";
            exit;
        }
    
        $tiff_file = $_SERVER['argv'][1];
        $modemdev  = $_SERVER['argv'][2];
    	
        $commID    = ($_SERVER['argc'] >= 4) ? $_SERVER['argv'][3] : "";
        $errormsg  = ($_SERVER['argc'] >= 5) ? $_SERVER['argv'][4] : "";
        $CIDNumber = ($_SERVER['argc'] >= 6) ? $_SERVER['argv'][5] : "";
        $CIDName   = ($_SERVER['argc'] == 7) ? $_SERVER['argv'][6] : "";
        
        faxes_log ("faxrcvd> Obteniendo informacion del tiff ".obtener_nombre($tiff_file)." CIDNumber: ".$CIDNumber." CIDName: ".$CIDName);
       
        // OBTENGO INFORMACION DEL FAX
        if (!faxinfo ($tiff_file, $sender, $pages, $date, $fax_papersize)) {
            faxes_log ("faxrcvd> Failed: $tiff_file $modemdev corrupted");
            exit;
        }
        $company_name = ($CIDName) ? $CIDName : $sender;
        $company_number  = ($CIDNumber) ? clean_faxnum ($CIDNumber) : $sender;
        faxes_log ("faxrcvd> Processing FAX from company_name: $company_name, company_number: $company_number");
    
    
        /**********************************************
         *         2) ALMACENO FAX: HD Y DB           *
         **********************************************/
        // copy tiff file to new dir
        $name_pdf = str_replace("tif","pdf",obtener_nombre($tiff_file));
        global $faxes_path;
        $pathDB = createFolder($company_number, $commID, "in");
        $pdffile = "$faxes_path/recvd/$pathDB/fax.pdf";
    
        //El usuario actual es uucp
        // create pdf in new dir
        //tiff2pdf ($tiff_file, $pdffile);
        echo exec("tiff2pdf $tiff_file -o $pdffile");
        // METO EL FAX EN LA BASE DE DATOS?
        fax_info_insert($name_pdf,$modemdev,$commID,$errormsg,$company_name,$company_number,'in',"recvd/$pathDB");
        faxes_log ("faxrcvd> Se copio el $name_pdf en la ruta $faxes_path/recvd/$pathDB y se grabo en la BD.");
        /**********************************************
         *         3) ENVIO EMAIL                     *
         **********************************************/
    
        $destinatario = obtener_mail_destiny($modemdev);
        $arrConfig    = getConfigurationSendingFaxMail($name_pdf,$company_name,$company_number);
        $titulo       = $arrConfig['subject'];
        $contenido    = $arrConfig['content'];
        $remite       = $arrConfig['remite'];
        $remitente    = $arrConfig['remitente'];
        $archivo      = $pdffile;
        $archivo_name = $name_pdf;
    
        print_r($arrConfig);
        echo $destinatario;
        enviar_mail_adjunto($destinatario,$titulo,$contenido,$remite,$remitente,$archivo,$archivo_name);
    
         /*
    	recvq/fax000000003.tif (ftp://elastix.palosanto.com:4559/recvq/fax000000003.tif):
    	          Sender: 
    	           Pages: 1
    	         Quality: Normal
    	            Size: ISO A4
    	        Received: 2007:06:11 16:30:20
    	 Time To Receive: 0:38
    	     Signal Rate: 9600 bit/s
    	     Data Format: 2-D MR
    	   Error Correct: No
    	         CallID1: 
    	         CallID2: 
    	     Received On: ttyIAX1
    	          CommID: 000000003 (ftp://elastix.palosanto.com:4559/log/c000000003)
        */
    ?>
    
     
  5. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    Ok so after a good nights sleep I found my solution within 10 minutes. Funny how that works. Here is the solution to give the PDF file the correct permissions.

    In faxrcvd.php or faxrcvd, depending on which received command you are using. You need to change the following lines

    OLD
    Code:
    tiff2pdf ($tiff_file, $pdffile);
    NEW
    Code:
    echo exec("tiff2pdf $tiff_file -o $pdffile");
          chmod("$pdffile", 0755);
     
  6. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    I know I am just talking to myself, but I am writing to hopefully help someone in my situation one day. Now that inbound faxes are working through the fax visor. I started testing outbound. Here is what I have. It send the fax but doesn't save it in the Visor and does not send notifications. Does anyone know where the function is called to process sent faxes. I looked at the log on this server and another hylafax server I have that works. I can't seem to find anything. Please help me if you see that I am missing something.

    Code:
    Aug 22 10:59:41.93: [ 6643]: SESSION BEGIN 000000087
    Aug 22 10:59:41.93: [ 6643]: HylaFAX (tm) Version 4.3.3
    Aug 22 10:59:41.93: [ 6643]: SEND FAX: JOB 16 DEST [u]FAXNUMBER[/u] COMMID 000000087 DEVICE '/dev/ttyIAX1' FROM 'root <root@xxxxxxxxxxxx.com>' USER root
    Aug 22 10:59:41.93: [ 6643]: STATE CHANGE: RUNNING -> SENDING
    Aug 22 10:59:41.93: [ 6643]: <-- [12:AT+FCLASS=1\r]
    Aug 22 10:59:41.93: [ 6643]: --> [2]
    Aug 22 10:59:41.93: [ 6643]: MODEM set XON/XOFF/FLUSH: input ignored, output disabled
    Aug 22 10:59:41.95: [ 6643]: DIAL 816193744110
    Aug 22 10:59:41.95: [ 6643]: <-- [17:ATDT816193744110\r]
    Aug 22 10:59:50.22: [ 6643]: --> [7]
    Aug 22 10:59:50.44: [ 6643]: --> [10:NO CARRIER]
    Aug 22 10:59:50.44: [ 6643]: MODEM No carrier
    Aug 22 10:59:50.44: [ 6643]: <-- [9:AT+FRS=7\r]
    Aug 22 10:59:52.83: [ 6643]: --> [2]
    Aug 22 10:59:52.83: [ 6643]: <-- [9:AT+FTH=3\r]
    Aug 22 10:59:52.84: [ 6643]: --> [7]
    Aug 22 10:59:52.84: [ 6643]: <-- HDLC<3:FF C8 D8>
    Aug 22 10:59:52.84: [ 6643]: <-- data [3]
    Aug 22 10:59:52.84: [ 6643]: <-- data [2]
    Aug 22 10:59:53.92: [ 6643]: --> [2]
    Aug 22 10:59:53.92: [ 6643]: SEND send CRP (command repeat)
    Aug 22 10:59:53.92: [ 6643]: <-- [9:AT+FRH=3\r]
    Aug 22 10:59:54.74: [ 6643]: --> [7]
    Aug 22 10:59:56.40: [ 6643]: --> HDLC<34:FF C0 04 B5 00 AA 12 9E 36 86 62 82 1A 04 14 2E B6 94 04 6A A6 4E CE 96 F6 76 04 2C 74 2C 74 2C 87 60>
    Aug 22 10:59:56.40: [ 6643]: --> [2]
    Aug 22 10:59:56.42: [ 6643]: REMOTE NSF "AD 00 55 48 79 6C 61 46 41 58 20 28 74 6D 29 20 56 65 72 73 69 6F 6E 20 34 2E 34 2E 34"
    Aug 22 10:59:56.42: [ 6643]: NSF remote fax equipment: HylaFAX 
    Aug 22 10:59:56.42: [ 6643]: NSF remote station ID: "HylaFAX (tm) Version 4.4.4"
    Aug 22 10:59:56.42: [ 6643]: <-- [9:AT+FRH=3\r]
    Aug 22 10:59:57.14: [ 6643]: --> [7]
    Aug 22 10:59:57.14: [ 6643]: --> HDLC<25:FF C0 02 1E 1E 86 4E 2A 76 96 0E 04 04 04 04 04 04 04 04 04 04 04 04 19 3C>
    Aug 22 10:59:57.14: [ 6643]: --> [2]
    Aug 22 10:59:57.14: [ 6643]: REMOTE CSI "pinTraxx"
    Aug 22 10:59:57.14: [ 6643]: <-- [9:AT+FRH=3\r]
    Aug 22 10:59:57.64: [ 6643]: --> [7]
    Aug 22 10:59:57.64: [ 6643]: --> HDLC<15:FF C8 01 00 73 5F 23 01 FB C1 01 01 18 90 61>
    Aug 22 10:59:57.70: [ 6643]: --> [2]
    Aug 22 10:59:57.70: [ 6643]: REMOTE best rate 9600 bit/s
    Aug 22 10:59:57.70: [ 6643]: REMOTE max A3 page width (303 mm)
    Aug 22 10:59:57.70: [ 6643]: REMOTE max unlimited page length
    Aug 22 10:59:57.70: [ 6643]: REMOTE best vres R16 x 15.4 line/mm
    Aug 22 10:59:57.70: [ 6643]: REMOTE format support: MH, MR, MMR
    Aug 22 10:59:57.70: [ 6643]: REMOTE supports T.30 Annex A, 256-byte ECM
    Aug 22 10:59:57.70: [ 6643]: REMOTE best 0 ms/scanline
    Aug 22 10:59:57.70: [ 6643]: USE 9600 bit/s
    Aug 22 10:59:57.70: [ 6643]: USE error correction mode
    Aug 22 10:59:57.70: [ 6643]: SEND file "docq/doc19.pdf;c1"
    Aug 22 10:59:57.70: [ 6643]: USE A4 page width (215 mm)
    Aug 22 10:59:57.70: [ 6643]: USE unlimited page length
    Aug 22 10:59:57.70: [ 6643]: USE 7.7 line/mm
    Aug 22 10:59:57.70: [ 6643]: USE 2-D MMR
    Aug 22 10:59:57.70: [ 6643]: USE 0 ms/scanline
    Aug 22 10:59:57.70: [ 6643]: SEND training at v.29 9600 bit/s
    Aug 22 10:59:57.70: [ 6643]: <-- [9:AT+FRS=7\r]
    Aug 22 10:59:57.78: [ 6643]: --> [2]
    Aug 22 10:59:57.78: [ 6643]: <-- [9:AT+FTH=3\r]
    Aug 22 10:59:57.80: [ 6643]: --> [7]
    Aug 22 10:59:57.80: [ 6643]: <-- HDLC<23:FF C0 C2 1E 1E 86 4E 2A 04 36 36 86 C6 04 04 04 04 04 04 04 04 04 04>
    Aug 22 10:59:57.80: [ 6643]: <-- data [23]
    Aug 22 10:59:57.80: [ 6643]: <-- data [2]
    Aug 22 10:59:59.34: [ 6643]: --> [7]
    Aug 22 10:59:59.34: [ 6643]: <-- HDLC<7:FF C8 C1 00 62 1F 22>
    Aug 22 10:59:59.34: [ 6643]: <-- data [7]
    Aug 22 10:59:59.34: [ 6643]: <-- data [2]
    Aug 22 10:59:59.74: [ 6643]: --> [2]
    Aug 22 10:59:59.74: [ 6643]: <-- [9:AT+FTS=7\r]
    Aug 22 10:59:59.84: [ 6643]: --> [2]
    Aug 22 10:59:59.84: [ 6643]: MODEM set XON/XOFF/FLUSH: input interpreted, output disabled
    Aug 22 10:59:59.84: [ 6643]: <-- [10:AT+FTM=96\r]
    Aug 22 10:59:59.86: [ 6643]: --> [7]
    Aug 22 10:59:59.86: [ 6643]: DELAY 400 ms
    Aug 22 11:00:00.26: [ 6643]: <-- data [1024]
    Aug 22 11:00:00.26: [ 6643]: <-- data [776]
    Aug 22 11:00:00.26: [ 6643]: <-- data [2]
    Aug 22 11:00:01.83: [ 6643]: --> [2]
    Aug 22 11:00:01.83: [ 6643]: MODEM set XON/XOFF/DRAIN: input ignored, output disabled
    Aug 22 11:00:01.83: [ 6643]: <-- [9:AT+FRH=3\r]
    Aug 22 11:00:02.93: [ 6643]: --> [7]
    Aug 22 11:00:03.75: [ 6643]: --> [10:NO CARRIER]
    Aug 22 11:00:03.75: [ 6643]: MODEM No carrier
    Aug 22 11:00:03.75: [ 6643]: <-- [9:AT+FRS=7\r]
    Aug 22 11:00:03.81: [ 6643]: --> [2]
    Aug 22 11:00:03.81: [ 6643]: <-- [9:AT+FTH=3\r]
    Aug 22 11:00:03.83: [ 6643]: --> [7]
    Aug 22 11:00:03.83: [ 6643]: <-- HDLC<3:FF C8 D8>
    Aug 22 11:00:03.83: [ 6643]: <-- data [3]
    Aug 22 11:00:03.83: [ 6643]: <-- data [2]
    Aug 22 11:00:04.91: [ 6643]: --> [2]
    Aug 22 11:00:04.91: [ 6643]: SEND send CRP (command repeat)
    Aug 22 11:00:04.91: [ 6643]: <-- [9:AT+FRH=3\r]
    Aug 22 11:00:05.87: [ 6643]: --> [7]
    Aug 22 11:00:06.74: [ 6643]: --> HDLC<5:FF C8 21 57 BE>
    Aug 22 11:00:06.80: [ 6643]: --> [2]
    Aug 22 11:00:06.80: [ 6643]: TRAINING succeeded
    Aug 22 11:00:06.80: [ 6643]: SEND begin page
    Aug 22 11:00:06.81: [ 6643]: SEND EOFB
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 0
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 1
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 2
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 3
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 4
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 5
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 6
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 7
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 8
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 9
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 10
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 11
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 12
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 13
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 14
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 15
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 16
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 17
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 18
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 19
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 20
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 21
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 22
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 23
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 24
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 25
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 26
    Aug 22 11:00:06.81: [ 6643]: SEND send frame number 27
    Aug 22 11:00:06.81: [ 6643]: MODEM set XON/XOFF/FLUSH: input interpreted, output disabled
    Aug 22 11:00:06.81: [ 6643]: <-- [9:AT+FRS=7\r]
    Aug 22 11:00:06.86: [ 6643]: --> [2]
    Aug 22 11:00:06.86: [ 6643]: <-- [10:AT+FTM=96\r]
    Aug 22 11:00:06.88: [ 6643]: --> [7]
    Aug 22 11:00:06.88: [ 6643]: DELAY 400 ms
    Aug 22 11:00:07.28: [ 6643]: <-- data [1030]
    Aug 22 11:00:07.28: [ 6643]: <-- data [1035]
    Aug 22 11:00:07.28: [ 6643]: <-- data [1042]
    Aug 22 11:00:07.28: [ 6643]: <-- data [1032]
    Aug 22 11:00:07.28: [ 6643]: <-- data [1036]
    Aug 22 11:00:07.28: [ 6643]: <-- data [1041]
    Aug 22 11:00:09.01: [ 6643]: <-- data [1030]
    Aug 22 11:00:09.01: [ 6643]: <-- data [845]
    Aug 22 11:00:09.01: [ 6643]: <-- data [2]
    Aug 22 11:00:13.98: [ 6643]: --> [2]
    Aug 22 11:00:13.98: [ 6643]: MODEM set XON/XOFF/DRAIN: input ignored, output disabled
    Aug 22 11:00:13.98: [ 6643]: <-- [9:AT+FTS=9\r]
    Aug 22 11:00:14.10: [ 6643]: --> [2]
    Aug 22 11:00:14.10: [ 6643]: <-- [9:AT+FTH=3\r]
    Aug 22 11:00:14.12: [ 6643]: --> [7]
    Aug 22 11:00:14.12: [ 6643]: <-- HDLC<7:FF C8 FD F4 00 00 D8>
    Aug 22 11:00:14.12: [ 6643]: <-- data [7]
    Aug 22 11:00:14.12: [ 6643]: <-- data [2]
    Aug 22 11:00:15.29: [ 6643]: --> [2]
    Aug 22 11:00:15.29: [ 6643]: SEND send PPS (partial page signal)
    Aug 22 11:00:15.29: [ 6643]: SEND send EOP (no more pages or documents)
    Aug 22 11:00:15.29: [ 6643]: <-- [9:AT+FRH=3\r]
    Aug 22 11:00:16.35: [ 6643]: --> [7]
    Aug 22 11:00:18.24: [ 6643]: --> HDLC<37:FF C8 3D 0F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 03 7D>
    Aug 22 11:00:18.30: [ 6643]: --> [2]
    Aug 22 11:00:18.30: [ 6643]: SEND recv PPR (partial page request)
    Aug 22 11:00:18.30: [ 6643]: <-- [9:AT+FRS=7\r]
    Aug 22 11:00:18.36: [ 6643]: --> [2]
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 4
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 5
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 6
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 7
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 8
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 9
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 10
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 11
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 12
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 13
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 14
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 15
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 16
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 17
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 18
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 19
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 20
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 21
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 22
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 23
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 24
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 25
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 26
    Aug 22 11:00:18.36: [ 6643]: SEND send frame number 27
    Aug 22 11:00:18.36: [ 6643]: MODEM set XON/XOFF/FLUSH: input interpreted, output disabled
    Aug 22 11:00:18.36: [ 6643]: <-- [9:AT+FRS=7\r]
    Aug 22 11:00:18.44: [ 6643]: --> [2]
    Aug 22 11:00:18.44: [ 6643]: <-- [10:AT+FTM=96\r]
    Aug 22 11:00:18.46: [ 6643]: --> [7]
    Aug 22 11:00:18.46: [ 6643]: DELAY 400 ms
    Aug 22 11:00:18.86: [ 6643]: <-- data [1039]
    Aug 22 11:00:18.86: [ 6643]: <-- data [1041]
    Aug 22 11:00:18.86: [ 6643]: <-- data [1034]
    Aug 22 11:00:18.86: [ 6643]: <-- data [1038]
    Aug 22 11:00:18.86: [ 6643]: <-- data [1033]
    Aug 22 11:00:19.74: [ 6643]: <-- data [1042]
    Aug 22 11:00:20.59: [ 6643]: <-- data [771]
    Aug 22 11:00:21.45: [ 6643]: <-- data [2]
    Aug 22 11:00:24.64: [ 6643]: --> [2]
    Aug 22 11:00:24.64: [ 6643]: MODEM set XON/XOFF/DRAIN: input ignored, output disabled
    Aug 22 11:00:24.64: [ 6643]: <-- [9:AT+FTS=9\r]
    Aug 22 11:00:24.76: [ 6643]: --> [2]
    Aug 22 11:00:24.76: [ 6643]: <-- [9:AT+FTH=3\r]
    Aug 22 11:00:24.78: [ 6643]: --> [7]
    Aug 22 11:00:24.78: [ 6643]: <-- HDLC<7:FF C8 FD F4 00 00 E8>
    Aug 22 11:00:24.78: [ 6643]: <-- data [7]
    Aug 22 11:00:24.78: [ 6643]: <-- data [2]
    Aug 22 11:00:25.96: [ 6643]: --> [2]
    Aug 22 11:00:25.96: [ 6643]: SEND send PPS (partial page signal)
    Aug 22 11:00:25.96: [ 6643]: SEND send EOP (no more pages or documents)
    Aug 22 11:00:25.96: [ 6643]: <-- [9:AT+FRH=3\r]
    Aug 22 11:00:27.05: [ 6643]: --> [7]
    Aug 22 11:00:27.93: [ 6643]: --> HDLC<5:FF C8 31 45 8F>
    Aug 22 11:00:27.99: [ 6643]: --> [2]
    Aug 22 11:00:27.99: [ 6643]: SEND recv MCF (message confirmation)
    Aug 22 11:00:27.99: [ 6643]: <-- [9:AT+FRS=7\r]
    Aug 22 11:00:28.05: [ 6643]: --> [2]
    Aug 22 11:00:28.05: [ 6643]: SEND end page
    Aug 22 11:00:28.05: [ 6643]: SEND FAX (000000087): FROM root@xxxxxxxxxxxxxx.com TO [u]FAXNUMBER[/u] (page 1 of 1 sent in 0:31)
    Aug 22 11:00:28.05: [ 6643]: SEND FAX (000000087): FROM root@xxxxxxxxxxxxxx.com TO [u]FIXNUMBER[/u] (docq/doc19.pdf;c1 sent in 0:31)
    Aug 22 11:00:29.05: [ 6643]: <-- [9:AT+FTH=3\r]
    Aug 22 11:00:29.06: [ 6643]: --> [7]
    Aug 22 11:00:29.06: [ 6643]: <-- HDLC<3:FF C8 DF>
    Aug 22 11:00:29.06: [ 6643]: <-- data [3]
    Aug 22 11:00:29.06: [ 6643]: <-- data [2]
    Aug 22 11:00:30.14: [ 6643]: --> [2]
    Aug 22 11:00:30.14: [ 6643]: MODEM input buffering enabled
    Aug 22 11:00:30.14: [ 6643]: <-- [5:ATH0\r]
    Aug 22 11:00:30.26: [ 6643]: --> [2]
    Aug 22 11:00:30.26: [ 6643]: MODEM set DTR OFF
    Aug 22 11:00:30.26: [ 6643]: MODEM set baud rate: 0 baud (flow control unchanged)
    Aug 22 11:00:30.26: [ 6643]: STATE CHANGE: SENDING -> MODEMWAIT (timeout 5)
    Aug 22 11:00:30.26: [ 6643]: SESSION END
     
  7. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Hi Jason,
    You are not alone!
    Now here is summer and weekend, so we go out to enjoy the sun and beaches. ;)

    You should add the line:

    NotifyCmd: bin/notify.php

    into /var/spool/hylafax/etc/config

    And check that you have this two files,

    /var/spool/hylafax/bin/notify.php
    /var/spool/hylafax/bin/notify-elastix.php

    as notify-elastix.php is the script that will be run.
    If you had Avantfax, the script to run would be notify-avantfax.php, see what notify.php does.

    One more thing, what are you using for outgoing faxes: SIP or IAX trunks, E1/T1, BRI, analog lines?
     
  8. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    Thank you kindly for the response. I got the inbound and outbound notifications working. Here is what I did for outbound notifications.

    Code:
    ln -s /var/www/html/avantfax/includes/notify.php /var/spool/hylafax/bin/avantfax-notify.php
    
    nano /var/spool/hylafax/etc/config
    
    #
    ## AvantFAX
    #
    NotifyCmd:      bin/avantfax-notify.php
    
    nano /var/spool/hylafax/etc/config.ttyIAX1
    
    #
    ## AvantFAX
    #
    DynamicConfig:  bin/dynconf.php
    
    cp /var/spool/hylafax/bin/faxrcvd /var/spool/hylafax/bin/faxrcvd.elastix
    
    ln -s /var/www/html/avantfax/includes/faxrcvd.php /var/spool/hylafax/bin/faxrcvd
    
    Now the problem I have is sending faxes. I keep getting "No Carrier Detected". I set up the line to monitor the transmission so I could hear what was going on, and it sounds like the other fax is answering, but Hylafax is just beeping like it is not hearing the other faxes answer tones.

    Does anyone know how to adjust the RX gain, or force Hylafax to start the fax process regardless of what it hears? Maybe with the ModemDialCmd: command or something?

    P.S. both faxes receiving and sending are Hylafax servers. The Elastix Hylafax server seems to receive faxes just fine, has problems sending faxes.
     
  9. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    OK scratch that, it was the Trunk I was receiving on. I had it set to a trunk that doesn't support T.38. I changed the trunk and now the outbound faxes are working ok.
     
  10. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    Just one thing after the next, Ok so here is the issue with outbound faxes saving to archive

    23.08.2009 10:49 send_mail> 'fax: XXXXXXX 23.08.2009 10:49' sent to 'XXXXXXX' from 'root@localhost' - ()
    23.08.2009 10:49 notify> FAILED to create PDF for Archive
    23.08.2009 10:49 convert2pdf> failed to create /var/www/html/avantfax/faxes/sent/2009/08/23/XXXXXXX/104921/fax.pdf
    23.08.2009 10:49 mkdirs> Error creating directory /var/www/html/avantfax/faxes/sent/2009
    23.08.2009 10:49 notify> Created company 'XXXXXXX' with cid '4'
    23.08.2009 10:49 notify> Executing: doneq/q32 done 0:45 (4)

    Looks like a permission error. I will tinker around and post what fixed it, if someone else already knows please let me know :) I am still learning and all the help I can get will much appreciated.
     
  11. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    Ok I found the answer to not saving archive file here http://www.elastix.org/index.php?option ... d=29#12572

    Now my issue is the email I am receiving to inform me of the fax success is blank. The one I got before I changed the folder permission said this

    Fax: OK
    Failed to create PDF for Archive:-(

    To: XXXXXXXXXX
    Re: asdf


    Not sure why it is blank now, once again I will google it.
     
  12. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    Ok so everything seems to work except the thumbnail and PDF attached to the email notifications. Avantfax doesn't attach the PDF regardless of my configuration in local-config. Also in my avantfax log it shows the PDF being attached, but it not in the email.

    send_mail> 'fax: 23.08.2009 15:52' sent to 'jason@domain.com' from 'fax@domain.com' - /var/www/html/avantfax/faxes/recvd/2009/08/23/XXXXXXXX/000000064/fax.pdf ()
     
  13. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Does the file /var/www/html/avantfax/faxes/recvd/2009/08/23/XXXXXXXX/000000064/fax.pdf exist?
    If so, give the output of:
    Code:
    ls -la /var/www/html/avantfax/faxes/recvd/2009/08/23/XXXXXXXX/000000064/fax.pdf
    
    Maybe the pdf exists, but it is empty? This would be a problem in the pdf generation.
     
  14. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    I verified and yes the file does exist. There is actually 4 files in that folder (fax.pdf, thumb.gif, prev0.gif, fax.tiff). I opened the PDF and it looks ok. Here is the output of the command you gave me
    Code:
    -rw-rw-rw- 1 uucp uucp 6408 Aug 23 15:52 /var/www/html/avantfax/faxes/recvd/2009/08/23/XXXXXXXXXX/000000064/fax.pdf
    
     
  15. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    Ok so I stopped postfix and installed sendmail and now the PDFs are attached to the email I receive. Not sure what other implications that will have, hopefully none.
     
  16. fenixdemetal

    Joined:
    Mar 20, 2009
    Messages:
    53
    Likes Received:
    0
    hello jasong and everybody else I have a similar problem I configured my elastix to recieve fax ( i only want to recieve) but I used a IAX2 ext, and the virtual fax, the only problem i have is that I recieve a E-Mail with the subjet: "Fax attached Nº fax000000006.pdf" but there is not pdf file attached!!! and I really need the pdf file on my email, I search for my faxes and they are saved on "/var/spool/hylafax/recvq" the fax visor also shows the fax I recieve but on clic it have a URL error.. how can i stop postfix and install sendmail, maybe it works for me...

    THANKS!!!
     
  17. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    Code:
    service stop postfix
    
    yum install sendmail
    
    
     
  18. fenixdemetal

    Joined:
    Mar 20, 2009
    Messages:
    53
    Likes Received:
    0
    Ok, i did it, but it did'nt work for me, I still recieve the e-mail without the attached file, do you have any idea why cant I recieve the pdf file on my e-mail, I will apreciate any help!

    thanks
     
  19. jasong

    Joined:
    Aug 20, 2009
    Messages:
    34
    Likes Received:
    0
    Have you checked to see if the option to attach the PDF is selected?

    Also I don't use the Elastix Fax Management interface, due to its lack of the ability to send outbound faxes. I am using Avantfax.

    Are you using the Elastix interface or Avantfax?

    That will help be guide you on what config file to look in for the setting.
     
  20. fenixdemetal

    Joined:
    Mar 20, 2009
    Messages:
    53
    Likes Received:
    0
    jasong Thaks for the quick reply!!!, I am using the Elastix Interface, becouse in this moment I just want to recieve the fax not to send also I dont know anything about Avantfax. I really dont know where to see if the option to attach the PDF is selected, so if you know i will apreciate you tell me where! I have searching in some config files on /var/spool/hylafax/bin, but i cant see some option like that, and my faxes are on /var/spool/hylafax/recvq, if this helps.

    Thanks a lot!
     

Share This Page