not setting the fax header

Home » Asterisk Users » not setting the fax header
Asterisk Users No Comments


after I solved my problem with the fax processing after receiving,
I got another problem while sending a fax: the header is not set properly.

I use a PHP_Script to upload a PDF file and to generate a call file.

A bash script is looking for existent call files in the web directory
and moves
them the asterisk’s outgoing directory.

Ok, my call file looks like this:

$cf_commands = “Channel: local/$ext@commonn”
.”MaxRetries: 5n”
.”RetryTime: 60n”
.”WaitTime: 60n”
.”Context: faxn”
.”Extension: 100n”
.”Set: FAXFILE=$file_dstn”
.”Set: FAXOPT(localstationid)=$_POST[mynumber]n”
.”Set: FAXOPT(headerinfo)=$_POST[mynumber]
$_POST[myname] $_POST[myemail]n”

As you can see, I set the LOCALHEADERINFO to string I got from a web form.

My fax extension for sending fax looks like that:

exten => 100,1,System(/usr/local/bin/ ${FAXFILE})
exten => 100,n,Wait(1)
exten => 100,n,Verbose(${BOUNDARY} ${FAXOPT(localstationid)}
exten => 100,n,Verbose(${BOUNDARY} ${FAXFILE})
exten => 100,n,SendFAX(${FAXFILE}converted)
exten => 100,n,Verbose(1,### FAXSTATUS: ${FAXSTATUS})
exten => 100,n,Verbose(1,### FAXERROR: ${FAXERROR})
exten => 100,n,Verbose(1,### FAXMODE: ${FAXMODE})
exten => 100,n,Verbose(1,### FAXPAGES: ${FAXPAGES})
exten => 100,n,Verbose(1,### FAXBITRATE: ${FAXBITRATE})
exten => 100,n,Verbose(1,### FAXRESOLUTION: ${FAXRESOLUTION})
exten => 100,n,Verbose(1,### REMOTESTATIONID: ${REMOTESTATIONID})
exten => 100,n,HangUp()

The Verbose() application shows to me that ${FAXOPT(headerinfo)} is
correctly set,
but the headerinfo is not appearing on the fax itself…
It’s not important if I set FAXOPT(headerinfo) or LOCALHEADERINFO, the
result is always the same: no header on the fax received.

I even tried to set FAXOPT(headerinfo) directly in the fax extension:
same result: no header on the fax…

Console output: