All pastes #34617 Raw Edit

Asterisk -- blank fa

public text v1 · immutable
#34617 ·published 2005-12-22 17:13 UTC
rendered paste body

I start with a call.pdf file in the current directory that I want to fax.  I run the
send-fax script, and I receive an empty fax at the fax machine I sent it to.  What am I doing wrong ?

I run this shell script as root:
-----------------------------------------------------------------------
#!/bin/bash

# copied from http://www.voip-info.org/wiki/view/app_rxfax+and+app_txfax
/usr/bin/gs -q -sDEVICE=tiffg3 -sPAPERSIZE=letter -r204x196 -dNOPAUSE -sOutputFile=./call.tif -- call.pdf

cp fax.call fax-out.call
chown asterisk.asterisk fax-out.call
mv fax-out.call /var/spool/asterisk/outgoing


-----------------------------------------------------------------------

This is my fax.call file:
-----------------------------------------------------------------------

#copied from /usr/src/asterisk/sample.call, modified by Rob

#
# This is a sample file that can be dumped in /var/spool/asterisk/outgoing
# to generate a call.  Obviously, you MUST specify at least a channel in
# the same format as you would for the "Dial" application.  Only one
# channel name is permitted.
#

Channel: Zap/1/2319884

#
# You may also specify a wait time (default is 45 seconds) for how long to
# wait for the channel to be answered, a retry time (default is 5 mins)
# for how soon to retry this call, and a maximum number of retries (default
# is 0) for how many times to retry this call.
#
MaxRetries: 2
RetryTime: 60
WaitTime: 30

#
# Once the call is answered, you must provide either an application/data
# combination, or a context/extension/priority in which to start the PBX.
#
Context: default
Context: ext-local
Extension: 103
Priority: 1

Set: TXFAX_NAME=/root/fax-sending/call.tif
Set: LOCALSTATIONID=Airlink-Asterisk

# outgoing fax
Context:  ext-fax
Extension: out_fax
Priority: 1
-----------------------------------------------------------------------

This is what is in my dialplan:
-----------------------------------------------------------------------
; added by Rob 22 Dec 2005
[ext-fax-outgoing]
exten => out_fax,1,Dial(${OUTFAXNUM},20,d)
exten => out_fax,2,txfax(${TXFAX_NAME}|caller)
exten => out_fax,3,Hangup
exten => h,1,Hangup()
-----------------------------------------------------------------------

This is what appears in /var/log/asterisk/full:
-----------------------------------------------------------------------
Dec 22 11:04:49 VERBOSE[12706] logger.c:     -- Attempting call on Zap/1/2319884 for out_fax@ext-fax:1 (Retry 1)
Dec 22 11:04:49 VERBOSE[12706] logger.c:     -- Requested transfer capability: 0x00 - SPEECH
Dec 22 11:04:49 DEBUG[12706] chan_zap.c: Queuing frame from PRI_EVENT_PROCEEDING on channel 0/1 span 1
Dec 22 11:04:49 NOTICE[12706] channel.c: Don't know what to do with control frame 15
Dec 22 11:04:50 DEBUG[12706] chan_zap.c: Enabled echo cancellation on channel 1
Dec 22 11:04:54 DEBUG[12706] chan_zap.c: Echo cancellation already on
Dec 22 11:04:54 VERBOSE[12706] logger.c:        > Channel Zap/1-1 was answered.
Dec 22 11:04:54 VERBOSE[12706] logger.c:     -- Executing TxFAX("Zap/1-1", "/root/fax-sending/call.tif|caller") in new stack
Dec 22 11:04:56 DEBUG[12706] chan_sip.c: Auto destroying call '4488399308184230908A0F3C72E60968@asterisk'
Dec 22 11:05:02 VERBOSE[12706] logger.c:     -- Executing Hangup("Zap/1-1", "") in new stack
Dec 22 11:05:02 VERBOSE[12706] logger.c:   == Spawn extension (ext-fax, out_fax, 2) exited non-zero on 'Zap/1-1'
Dec 22 11:05:02 VERBOSE[12706] logger.c:     -- Executing Hangup("Zap/1-1", "") in new stack
Dec 22 11:05:02 VERBOSE[12706] logger.c:   == Spawn extension (ext-fax, h, 1) exited non-zero on 'Zap/1-1'
-----------------------------------------------------------------------

This is what appears on the *CLI> prompt window:
-----------------------------------------------------------------------
   -- Attempting call on Zap/1/2319884 for out_fax@ext-fax:1 (Retry 1)
    -- Requested transfer capability: 0x00 - SPEECH
       > Channel Zap/1-1 was answered.
    -- Executing TxFAX("Zap/1-1", "/root/fax-sending/call.tif|caller") in new stack
    -- Executing Hangup("Zap/1-1", "") in new stack
  == Spawn extension (ext-fax, out_fax, 2) exited non-zero on 'Zap/1-1'
    -- Executing Hangup("Zap/1-1", "") in new stack
  == Spawn extension (ext-fax, h, 1) exited non-zero on 'Zap/1-1'
    -- Hungup 'Zap/1-1'
-----------------------------------------------------------------------