[Home]

Summary:ASTERISK-13498: Sending and receiving a fax between extensions on the same Asterisk machine fails
Reporter:Anthony Messina (amessina)Labels:
Date Opened:2009-03-06 02:21:09.000-0600Date Closed:2009-03-09 07:48:05
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_fax
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When I attempt to send a fax from one extension to another on the same Asterisk machine, the process always fails. I have no trouble sending or receiving faxes via audio or T.38 as long as one of the endpoints is not on my Asterisk machine.

I originate the call via AMI.  With the channel set to Local/sendfax@mss-fax/n and the Exten set to 2240 (other proper Originate variables are set as well--I use this same method to send faxes out of this machine).

The following is the CLI output with debug=3:
== Manager 'fax' logged off from 127.0.0.1
-- Executing [2240@mss-fax:1] Set("Local/sendfax@mss-fax-efcb;1", "MAILTO=amessina") in new stack
-- Executing [2240@mss-fax:2] Set("Local/sendfax@mss-fax-efcb;1", "ARRAY(LOCALSTATIONID,LOCALHEADERINFO,FAXFILE)=+1 773 XXX XXXX,Messinet Secure Services - Asterisk FAX Gateway,/var/spool/asterisk/fax/chicago-1236326632.201.tif") innew stack
-- Executing [2240@mss-fax:3] ReceiveFAX("Local/sendfax@mss-fax-efcb;1", "/var/spool/asterisk/fax/chicago-1236326632.201.tif") in new stack
[Mar  6 02:08:53] WARNING[20982]: app_fax.c:439 transmit_audio: It looks like we hung. Aborting.
[Mar  6 02:08:53] WARNING[20982]: app_fax.c:173 phase_e_handler: Error transmitting fax. result=49: The call dropped prematurely.
[Mar  6 02:08:53] WARNING[20982]: app_fax.c:618 transmit: Transmission error
== Spawn extension (mss-fax, 2240, 3) exited non-zero on 'Local/sendfax@mss-fax-efcb;1'
-- Executing [h@mss-fax:1] Hangup("Local/sendfax@mss-fax-efcb;1", "") in new stack
== Spawn extension (mss-fax, h, 1) exited non-zero on 'Local/sendfax@mss-fax-efcb;1'
[Mar  6 02:08:53] WARNING[20981]: app_fax.c:173 phase_e_handler: Error transmitting fax. result=49: The call dropped prematurely.
[Mar  6 02:08:53] WARNING[20981]: app_fax.c:618 transmit: Transmission error
== Spawn extension (mss-fax, sendfax, 2) exited non-zero on 'Local/sendfax@mss-fax-efcb;2'
-- Executing [h@mss-fax:1] Hangup("Local/sendfax@mss-fax-efcb;2", "") in new stack
== Spawn extension (mss-fax, h, 1) exited non-zero on 'Local/sendfax@mss-fax-efcb;2'

****** ADDITIONAL INFORMATION ******

My dialplan is as follows:
[mss-fax]
include => fax-extensions

exten => sendfax,1,Set(ARRAY(LOCALSTATIONID,LOCALHEADERINFO)=+1 773 XXX XXXX,Messinet Secure Services - Asterisk FAX Gateway)
exten => sendfax,n,SendFAX(${var1}/fax.tif)
exten => sendfax,n,TrySystem(/bin/echo "${FAXSTATUS},${FAXERROR},${FAXMODE},${REMOTESTATIONID},${FAXPAGES},${FAXBITRATE},${FAXRESOLUTION},${CDR(uniqueid)}" > ${var1}/FAXSTATUS)
exten => sendfax,n,Hangup()

exten => h,1,Hangup()

[fax-extensions]
exten => fax,1,Goto(2240,1)
exten => 2240,1,Set(MAILTO=amessina)
exten => 2240,n,Set(ARRAY(LOCALSTATIONID,LOCALHEADERINFO,FAXFILE)=+1 773 XXX XXXX,Messinet Secure Services - Asterisk FAX Gateway,/var/spool/asterisk/fax/${CDR(uniqueid)}.tif)
exten => 2240,n,ReceiveFAX(${FAXFILE})
exten => 2240,n,TrySystem(/usr/bin/fax-gw -f "${FAXFILE}" -e "${FAXERROR}" -m "${FAXMODE}" -i "${REMOTESTATIONID}" -p "${FAXPAGES}" -b "${FAXBITRATE}" -r "${FAXRESOLUTION}" -c "${CALLERID(name)}" -n "${CALLERID(num)}" -t "${MAILTO}")
exten => 2240,n,Hangup()

exten => h,1,Hangup()
Comments:By: Joshua C. Colp (jcolp) 2009-03-09 07:48:04

This is a known limitation with the way chan_local and app_fax are interacting. The only suggestion is to make sure internal_timing is enabled in asterisk.conf under options and that you have a Dahdi timing source.