[asterisk-users] digium fax: failed to queue document
Martin
asterisklist at callthem.info
Sat Sep 26 21:16:34 CDT 2009
u don't change the ${uniquefile} for the second System/Originate
try to add a string to the ${uniquefile} ...
eg
${uniquefile}0
Martin
On Sat, Sep 26, 2009 at 8:05 PM, sean darcy <seandarcy2 at gmail.com> wrote:
> In my quest to actually send a fax, I'm now stuck trying to send the
> confirm.
>
> First I send the fax:
>
> -- Executing [send at outbound-fax:2] System("Console/dsp", "env echo
> -e "Channel:DAHDI/g0/12036378447\\nContext:fax-tx\\nExtension:
> s\\nPriority: 1\\n" >/var/spool/asterisk/outgoing/call-1254012878.0") in
> new stack
> -- Auto fallthrough, channel 'Console/dsp' status is 'UNKNOWN'
> << Hangup on console >>
> -- Attempting call on DAHDI/g0/12036378447 for s at fax-tx:1 (Retry 1)
> -- Requested transfer capability: 0x00 - SPEECH
> > Channel DAHDI/1-1 was answered.
> -- Executing [s at fax-tx:1] SendFAX("DAHDI/1-1",
> "/var/spool/asterisk/fax/20090922_1301.tif") in new stack
> -- Channel 'DAHDI/1-1' sending fax
> '/var/spool/asterisk/fax/20090922_1301.tif'
> -- Channel 'DAHDI/1-1' fax session '0' started
> .........
>
> And that works.
>
> Then I try to send the confirm:
>
> 'h' => 1. Set(RID=${FAXOPT(remotestationid)})
> [pbx_config]
> 2.
> Set(DateTime=${STRFTIME(${EPOCH},,%Y%m%d)}_${STRFTIME(${EPOCH},,%H%M)})
> [pbx_config]
> 3.
> Set(GLOBAL(StatusFile)=/var/spool/asterisk/fax-tx-status-${DateTime})
> [pbx_config]
> 4. System(env echo -e "${FAXOPT(pages)} Page Fax
> sent to ${EXTEN}. Remote ID: ${RID}" > ${StatusFile}-l1) [pbx_config]
> 5. System(env echo -e "Status: ${FAXOPT(status)}
> ${FAXOPT(statusstr)}" > ${StatusFile}-l2) [pbx_config]
> 6. System(convert -background white -fill black
> -pointsize 18 text:${StatusFile}-l1 text:${StatusFile}-l2 -crop
> 600x100+1+1 -append ${StatusFile}.tif) [pbx_config]
> 7. Set(GLOBAL(StatusFile)=${StatusFile})
> [pbx_config]
> 8.
> Set(UniqueFile=/var/spool/asterisk/outgoing/call-${UNIQUEID}) [pbx_config]
> 9. System(env echo -e
> "Channel:DAHDI/g0/abbbcccdddd\\nContext:fax-confirm-tx\\nExtension:
> s\\nPriority: 1\\n" >${UniqueFile}) [pbx_config]
>
> But that fails:
>
> -- Executing [h at fax-tx:1] Set("DAHDI/1-1", "RID=bbb-ccc-dddd") in
> new stack
> -- Executing [h at fax-tx:2] Set("DAHDI/1-1",
> "DateTime=20090926_2055") in new stack
> -- Executing [h at fax-tx:3] Set("DAHDI/1-1",
> "GLOBAL(StatusFile)=/var/spool/asterisk/fax-tx-status-20090926_2055") in
> new stack
> == Setting global variable 'StatusFile' to
> '/var/spool/asterisk/fax-tx-status-20090926_2055'
> -- Executing [h at fax-tx:4] System("DAHDI/1-1", "env echo -e "1 Page
> Fax sent to h. Remote ID: bbb-ccc-dddd" >
> /var/spool/asterisk/fax-tx-status-20090926_2055-l1") in new stack
> -- Executing [h at fax-tx:5] System("DAHDI/1-1", "env echo -e "Status:
> SUCCESS FAX_SUCCESS" >
> /var/spool/asterisk/fax-tx-status-20090926_2055-l2") in new stack
> -- Executing [h at fax-tx:6] System("DAHDI/1-1", "convert -background
> white -fill black -pointsize 18
> text:/var/spool/asterisk/fax-tx-status-20090926_2055-l1
> text:/var/spool/asterisk/fax-tx-status-20090926_2055-l2 -crop
> 600x100+1+1 -append
> /var/spool/asterisk/fax-tx-status-20090926_2055.tif") in new stack
> -- Executing [h at fax-tx:7] Set("DAHDI/1-1",
> "GLOBAL(StatusFile)=/var/spool/asterisk/fax-tx-status-20090926_2055") in
> new stack
> == Setting global variable 'StatusFile' to
> '/var/spool/asterisk/fax-tx-status-20090926_2055'
> -- Executing [h at fax-tx:8] Set("DAHDI/1-1",
> "UniqueFile=/var/spool/asterisk/outgoing/call-1254012879.1") in new stack
> -- Executing [h at fax-tx:9] System("DAHDI/1-1", "env echo -e
> "Channel:DAHDI/g0/abbbcccdddd\\nContext:fax-confirm-tx\\nExtension:
> s\\nPriority: 1\\n" >/var/spool/asterisk/outgoing/call-1254012879.1") in
> new stack
> -- Attempting call on DAHDI/g0/abbbcccdddd for s at fax-confirm-tx:1
> (Retry 1)
> -- Requested transfer capability: 0x00 - SPEECH
> -- Hungup 'DAHDI/1-1'
> [Sep 26 20:55:17] NOTICE[14894]: pbx_spool.c:357 attempt_thread: Call
> completed to DAHDI/g0/abbbcccdddd
> > Channel DAHDI/2-1 was answered.
> -- Executing [s at fax-confirm-tx:1] SendFAX("DAHDI/2-1",
> "/var/spool/asterisk/fax-tx-status-20090926_2055.tif") in new stack
> -- Channel 'DAHDI/2-1' sending fax
> '/var/spool/asterisk/fax-tx-status-20090926_2055.tif'
> [Sep 26 20:55:26] ERROR[14912]: res_fax_digium.c:1761 dgm_fax_start: fax
> handle: 0 failed to queue document
> '/var/spool/asterisk/fax-tx-status-20090926_2055.tif'
> [Sep 26 20:55:26] ERROR[14912]: res_fax.c:811 generic_fax_exec: channel
> 'DAHDI/2-1' fax session '1' failure, reason: 'failed to start fax session'
>
> The file does exist:
>
> file /var/spool/asterisk/fax-tx-status-20090926_2055.tif
> /var/spool/asterisk/fax-tx-status-20090926_2055.tif: TIFF image data,
> little-endian
> ls -l /var/spool/asterisk/fax-tx-status-20090926_2055.tif
> -rw-r--r-- 1 root root 480892 2009-09-26 20:55
> /var/spool/asterisk/fax-tx-status-20090926_2055.tif
>
>
> Any help appreciated.
>
> sean
>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list