how to send the fax

Community-based Support for users of Free Fax For Asterisk

how to send the fax

Postby ramesh raju » Sat Apr 11, 2009 1:07 pm

hi ,

I have installed the free fax for asterisk. can you please tell me how to send the fax from my asterisk. i need to write any script are any thing could you please help me out. i have sucess fully installed the fax modules the modules are showing up in my asterisk cli. but i did not fot any files in to my /etc/asterisk folder.
ramesh raju
Newsterisk
 
Posts: 2
Joined: Thu Aug 31, 2006 4:33 pm

Postby malcolmd » Tue Apr 14, 2009 6:52 am

Howdy,

Section 3.1.2 of the manual describes the SendFax application.

Appendix A of the manual has a context called [fax-tx] that shows example dialplan logic for sending a fax using the SendFax application.

Cheers.
malcolmd
Moves Like Spencer
 
Posts: 2696
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

how I sent a fax

Postby mykhyggz » Tue Apr 14, 2009 10:13 pm

First, the example in the PDF manual download seems to fail with "|" used as a separator for options to the SendFAX app.

So, exten => send,n,SendFAX(/var/spool/asterisk/fax/outgoing/${FAXFILE},d)... (note comma, not pipe after the file name) this was throwing me for a while.

. . .

Anyway, I did from CLI >

originate DAHDI/1/8889990000 extension send@fax-tx

I suppose there are many other ways to send a fax with SendFAX, but this worked for me.
mykhyggz
Newsterisk
 
Posts: 12
Joined: Tue Apr 14, 2009 2:46 pm

Postby cgi.net » Thu Apr 16, 2009 12:57 am

Code: Select all
Channel: ZAP/g1/12345678
MaxRetries: 0
RetryTime: 10
WaitTime: 50
Application:SendFAX
Data:/tmp/test.tiff

save the above into a call file then move this file to /var/spool/asterisk/outgoing

Good luck!
cgi.net
Newsterisk
 
Posts: 2
Joined: Thu Apr 16, 2009 12:53 am

Postby jpcansa » Fri Apr 17, 2009 2:27 pm

where can i get the PDF manual?
jpcansa
Newsterisk
 
Posts: 2
Joined: Fri Apr 17, 2009 2:26 pm

Postby jpcansa » Fri Apr 17, 2009 2:55 pm

jpcansa
Newsterisk
 
Posts: 2
Joined: Fri Apr 17, 2009 2:26 pm

Postby ramesh raju » Mon Apr 27, 2009 4:22 pm

Any one could you please post the detailed setps how to send the fax with the script using fax for asterisk
ramesh raju
Newsterisk
 
Posts: 2
Joined: Thu Aug 31, 2006 4:33 pm

Postby maulid » Mon May 18, 2009 1:02 am

cgi.net wrote:
Code: Select all
Channel: ZAP/g1/12345678
MaxRetries: 0
RetryTime: 10
WaitTime: 50
Application:SendFAX
Data:/tmp/test.tiff

save the above into a call file then move this file to /var/spool/asterisk/outgoing

Good luck!


I've tried the code above but received the following error:

Code: Select all
   -- Attempting call on ZAP/g3/20958877 for application SendFAX(/tmp/leo.tiff) (Retry 1)
       > Channel Zap/3-1 was answered.
       > Launching SendFAX(/tmp/leo.tiff) on Zap/3-1
    -- Channel 'Zap/3-1' is sending fax '/tmp/leo.tiff'
[May 18 15:02:35] ERROR[23497]: res_fax_digium.c:1861 dgm_fax_start: fax handle: 0 failed to queue document '/tmp/leo.tiff'
[May 18 15:02:35] ERROR[23497]: res_fax.c:980 generic_fax_exec: channel 'Zap/3-1' fax session '4' failure, reason: 'failed to start fax session'
[May 18 15:02:35] WARNING[23498]: res_fax_digium.c:583 update_registry_statistics: unknown fax session result '0'
[May 18 15:02:35] WARNING[23498]: res_fax_digium.c:463 P30RESULT_to_str: unhandled fax result 'RSLT_IN_PROGRESS'
    -- Channel 'Zap/3-1' fax session '4' is complete, result: 'FAILED' (FAX_FAILURE_UNKNOWN), error: 'NO_ERROR', pages: 0, resolution: 'unknown', transfer rate: '2400', remoteSID: ''
    -- Hungup 'Zap/3-1'
[May 18 15:02:35] NOTICE[23497]: pbx_spool.c:366 attempt_thread: Call completed to ZAP/g3/20958877


Any idea? I don't need a fax machine, just want Asterisk to save all the received faxes as a tiff file and would want to be able to send faxes via command line (using tiff file).
maulid
Newsterisk
 
Posts: 5
Joined: Tue May 05, 2009 11:45 pm

Postby arobins » Thu May 21, 2009 9:06 am

Maulid,
I am receiving this exact same error on my first outbound attempt after installation. Did you resolve your issue?

Thanks,
Adam
arobins
Newsterisk
 
Posts: 1
Joined: Thu May 21, 2009 9:00 am

Postby maulid » Thu May 21, 2009 6:07 pm

arobins wrote:Maulid,
I am receiving this exact same error on my first outbound attempt after installation. Did you resolve your issue?

Thanks,
Adam


Not yet. Does anyone here had successfully make it work? Please share with us.
maulid
Newsterisk
 
Posts: 5
Joined: Tue May 05, 2009 11:45 pm

Postby sethsdad0627 » Fri May 22, 2009 11:54 am

Try changing your call file to read like this
Channel: ZAP/g1/ww12345678
Callerid: SIP/100 *use an extension in your list
MaxRetries: 1
RetryTime: 10
WaitTime: 50
Application:SendFAX
Data:/tmp/test.tiff
sethsdad0627
Oldsterisk
 
Posts: 208
Joined: Tue Nov 04, 2008 9:15 am

Postby maulid » Mon May 25, 2009 1:01 am

sethsdad0627 wrote:Try changing your call file to read like this
Channel: ZAP/g1/ww12345678
Callerid: SIP/100 *use an extension in your list
MaxRetries: 1
RetryTime: 10
WaitTime: 50
Application:SendFAX
Data:/tmp/test.tiff


Thanks for your suggestion but it still wouldn't work
maulid
Newsterisk
 
Posts: 5
Joined: Tue May 05, 2009 11:45 pm

Postby sethsdad0627 » Tue May 26, 2009 8:03 am

do "set fax debug on" from cli
run the call file again
post your CLI output from the call
sethsdad0627
Oldsterisk
 
Posts: 208
Joined: Tue Nov 04, 2008 9:15 am

Postby maulid » Tue May 26, 2009 9:59 pm

sethsdad0627 wrote:do "set fax debug on" from cli
run the call file again
post your CLI output from the call


Ok. Here's the CLI output:

Code: Select all
[root@tfsbbackup asterisk]# asterisk -rvvvvvvvvvvvvvvvvvvvvvv
Asterisk 1.4.23, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf': Found
  == Parsing '/etc/asterisk/extconfig.conf': Found
Connected to Asterisk 1.4.23 currently running on tfsbbackup (pid = 2149)
Verbosity is at least 22
    -- Remote UNIX connection
    -- Attempting call on ZAP/g3/ww0178859497 for application SendFAX(/tmp/leo.tiff) (Retry 1)
       > Channel Zap/3-1 was answered.
       > Launching SendFAX(/tmp/leo.tiff) on Zap/3-1
    -- Channel 'Zap/3-1' is sending fax '/tmp/leo.tiff'
[May 27 12:00:54] ERROR[6698]: res_fax_digium.c:1861 dgm_fax_start: fax handle: 0 failed to queue document '/tmp/leo.tiff'
[May 27 12:00:54] ERROR[6698]: res_fax.c:980 generic_fax_exec: channel 'Zap/3-1' fax session '6' failure, reason: 'failed to start fax session'
[May 27 12:00:54] WARNING[6699]: res_fax_digium.c:583 update_registry_statistics: unknown fax session result '0'
[May 27 12:00:54] WARNING[6699]: res_fax_digium.c:463 P30RESULT_to_str: unhandled fax result 'RSLT_IN_PROGRESS'
    -- Channel 'Zap/3-1' fax session '6' is complete, result: 'FAILED' (FAX_FAILURE_UNKNOWN), error: 'NO_ERROR', pages: 0, resolution: 'unknown', transfer rate: '2400', remoteSID: ''
    -- Hungup 'Zap/3-1'
[May 27 12:00:54] NOTICE[6698]: pbx_spool.c:366 attempt_thread: Call completed to ZAP/g3/ww0178859497
tfsbbackup*CLI>
maulid
Newsterisk
 
Posts: 5
Joined: Tue May 05, 2009 11:45 pm

Postby sethsdad0627 » Wed May 27, 2009 7:13 am

can you post the "tiffinfo" on leo.tiff?

tiffinfo /tmp/leo.tiff

The fax routine prefers a group 3 format and in its past life was very picky about how the tiff was formatted.

Here's what one of mine looks like
TIFF Directory at offset 0x4988 (18824)
Subfile Type: multi-page document (2 = 0x2)
Image Width: 1728 Image Length: 1146
Resolution: 204, 98 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 3
Photometric Interpretation: min-is-white
FillOrder: lsb-to-msb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 1146
Planar Configuration: single image plane
Page Number: 0-0
Software: GPL Ghostscript 8.62
DateTime: 2009:05:22 16:38:55
Group 3 Options: 2-d encoding+EOL padding (5 = 0x5)
TIFF Directory at offset 0x13cb0 (81072)
Subfile Type: multi-page document (2 = 0x2)
Image Width: 1728 Image Length: 1078
Resolution: 204, 98 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 3
Photometric Interpretation: min-is-white
FillOrder: lsb-to-msb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 1078
Planar Configuration: single image plane
Page Number: 1-0
Software: GPL Ghostscript 8.62
DateTime: 2009:05:22 16:38:56
Group 3 Options: 2-d encoding+EOL padding (5 = 0x5)
sethsdad0627
Oldsterisk
 
Posts: 208
Joined: Tue Nov 04, 2008 9:15 am

Postby maulid » Thu Jun 11, 2009 9:48 am

sethsdad0627 wrote:can you post the "tiffinfo" on leo.tiff?

tiffinfo /tmp/leo.tiff

The fax routine prefers a group 3 format and in its past life was very picky about how the tiff was formatted.



Sorry for the late reply. Here's the output:

Code: Select all
TIFF Directory at offset 0x8 (8)
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 2338 Image Length: 1638
  Resolution: 200, 200 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT Group 3
  Photometric Interpretation: min-is-white
  FillOrder: lsb-to-msb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 1638
  Planar Configuration: single image plane
  Page Number: 0-1
  Group 3 Options: (0 = 0x0)
maulid
Newsterisk
 
Posts: 5
Joined: Tue May 05, 2009 11:45 pm

Postby zefrench » Sun Sep 20, 2009 5:29 pm

The only I was able to get this to work was to save the PDF with Acrobat with Compatilibty set to Acrobat 4.0 and higher, and to use ghostscript for tif conversion using the command line for ghostscrip from the Digium Manual.
zefrench
Newsterisk
 
Posts: 1
Joined: Thu Apr 19, 2007 11:12 am


Return to Fax For Asterisk

Who is online

Users browsing this forum: No registered users and 2 guests