Call-file problem for SendFax()

Community-based Support for users of Free Fax For Asterisk

Call-file problem for SendFax()

Postby alias_ebx » Tue Jan 25, 2011 10:35 am

hello!

@situation:
i have a working "Asterisk 1.8.2.1" and "Digium FAX Driver 1.8.0_1.2.1" running and i am able to receive incoming faxes.
the problem is, that i do not understand yet, how to exactly put the information together to get a working call file.

my channel for outgoing calls is titan0. the technology ist SIP.
so when regulary placing calls i use this syntax: SIP/____DESTINATION_NUMBER____@titan0 which works fine.
with the given configuration i get following errors:

Code: Select all
    -- Attempting call on SIP/____DESTINATION_NUMBER____@titan0 for s@fax-outgoing:1 (Retry 1)


... and ...

Code: Select all
    -- Channel 'SIP/titan0-00000000' sending FAX:
    --    /var/lib/asterisk/fax-outgoing/output.tif
[Jan 25 16:42:18] ERROR[8481]: res_fax_digium.c:2104 dgm_fax_start: FAX handle 0: failed to queue document '/var/lib/asterisk/fax-outgoing/output.tif'
[Jan 25 16:42:18] ERROR[8481]: res_fax.c:1203 generic_fax_exec: channel 'SIP/titan0-00000000' FAX session '0' failure, reason: 'failed to start FAX session' (INIT_ERROR)


@outgoing fax context:
Code: Select all
[fax-outgoing]

exten => s,1,NoOp(**** SENDING FAX ****)
exten => s,n,Wait(1)
exten => s,n,Set(FAXCOUNT=1)
exten => s,n,Set(FAXFILE=output.tif)

exten => s,n,NoOp(**** SETTING FAXOPT ****)
exten => s,n,Set(FAXOPT(ecm)=yes)
exten => s,n,Set(FAXOPT(localstationid)=____MY_FAX_NUMBER____)
exten => s,n,Set(FAXOPT(maxrate)=14400)
exten => s,n,Set(FAXOPT(minrate)=2400)

exten => s,n,NoOp(**** SENDING FAX : ${FAXFILE} ****)
exten => s,n,SendFAX(/var/lib/asterisk/fax-outgoing/${FAXFILE},d)

exten => s,n,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)})
exten => s,n,NoOp(FAXOPT(filename) : ${FAXOPT(filename)})
exten => s,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)})
exten => s,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)})
exten => s,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)})
exten => s,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)})
exten => s,n,NoOp(FAXOPT(pages) : ${FAXOPT(pages)})
exten => s,n,NoOp(FAXOPT(rate) : ${FAXOPT(rate)})
exten => s,n,NoOp(FAXOPT(remotestationid) : ${FAXOPT(remotestationid)})
exten => s,n,NoOp(FAXOPT(resolution) : ${FAXOPT(resolution)})
exten => s,n,NoOp(FAXOPT(status) : ${FAXOPT(status)})
exten => s,n,NoOp(FAXOPT(statusstr) : ${FAXOPT(statusstr)})
exten => s,n,NoOp(FAXOPT(error) : ${FAXOPT(error)})


@callfile:
Code: Select all
Channel: SIP/____DESTINATION_NUMBER____@titan0
MaxRetries: 0
RetryTime: 60
WaitTime: 60
Archive: yes
Context: fax-outgoing
Extension: s
Priority: 1
Set: FAXFILE=/var/lib/asterisk/fax-outgoing/output.tif
Set: FAXHEADER=____SOME_TEXT____
Set: TIMESTAMP=25/01/11 : 16:40:01
Set: DESTINATION=____DESTINATION_NUMBER____
Set: LOCALID=____MY_FAX_NUMBER____
Set: EMAIL=____MY_EMAIL_ADDRESS____


i actually do not completely understand the procedure for sending faxes with FFA...
although i actually know that i have messed up those variable assignments like filename - they are probably redundant: in callfile and in fax-outgoing context. its just temporary sample-copy-paste-code...

how should my call-file look like?

regards.
alias_ebx
Newsterisk
 
Posts: 1
Joined: Tue Jan 25, 2011 10:20 am

Re: Call-file problem for SendFax()

Postby francescos » Mon Feb 07, 2011 10:13 am

AFAIK, you'd better put the outcall destination inside callfile as follows:
Code: Select all
Channel: SIP/titan0/____DESTINATION_NUMBER____
francescos
Newsterisk
 
Posts: 4
Joined: Mon Jan 18, 2010 6:17 am

Re: Call-file problem for SendFax()

Postby akdayal » Wed Mar 23, 2011 9:22 pm

Your trunk is not supporting Fax traffic, is g711 codecs allow?
akdayal
Newsterisk
 
Posts: 15
Joined: Thu Apr 12, 2007 7:40 am

Re: Call-file problem for SendFax()

Postby rfine » Sun Nov 20, 2011 11:25 am

Have you verified that the document trying to be queued is a valid tif file that Asterisk agrees with? There is a ghostscript command that you can run for this see below. Basically you have to set parameters on the document that conform with what Asterisk is allowed to send. This is from a small Perl script I wrote a while back.

gs -q -dNOPAUSE -dBATCH -sDEVICE=tiffg4 -sPAPERSIZE=letter -sOutputFile=/tmp/finaltif.tif /tmp/thepdf.pdf

This will have ghostscript convert the file into the format that Asterisk requires for documents to be sent. Hope this helps! :D
rfine
Oldsterisk
 
Posts: 93
Joined: Wed Sep 28, 2011 10:51 am


Return to Fax For Asterisk

Who is online

Users browsing this forum: No registered users and 1 guest