Summary:ASTERISK-16510: ReceiveFax doesn't work with attended transfer
Reporter:ornix (ornix)Labels:
Date Opened:2010-08-04 22:40:22Date Closed:2011-06-07 14:05:12
Versions:Frequency of
Environment:Attachments:( 0) debug_208_115_appfax.txt
Description:SIP/208 (Panasonic-Fax in Linksys SPA2102) calls SIP/115 (Linksys SPA504G) with app_dial. SIP/115 answers and presses Xfer-button then dials 158. After i hear CNG from ReceiveFax, i press Xfer on SPA504G again to complete transfer. After that SIP/208 and ReceiveFax are connected, but i don't hear CNG in Panasonic-Fax, so fax transmission from SIP/208 to ReceiveFax fails.

exten => s,1,Answer()
exten => s,n,Set(FAXFILE=/mnt/fax_kw12/fax_${STRFTIME(${EPOCH},,%Y-%m-%d_%H-%M-%S)}.tif)
exten => s,n,ReceiveFax(${FAXFILE})
exten => h,1,System(chmod 777 ${FAXFILE})
exten => h,n,NoOp(${FAXSTATUS})
exten => h,n,NoOp(${FAXERROR})

exten => _XXX,1,Dial(SIP/${EXTEN},,tT)
exten => 158,1,Goto(fax,s,1)

This scheme doesn't work only with Attended Transfer and works fine with Blind.


-- Executing [115@office1:1] Dial("SIP/208-00000101", "SIP/115,,tT") in new stack
-- Called 115
-- SIP/115-00000102 is ringing
-- SIP/115-00000102 answered SIP/208-00000101
NOTICE[11281]: rtp.c:1146 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP:
pbx*CLI> core show channels
Channel              Location             State   Application(Data)
SIP/115-00000102     (None)               Up      AppDial((Outgoing Line))
SIP/208-00000101     115@office1:1        Up      Dial(SIP/115,,tT)
2 active channels
1 active call
184 calls processed
-- Started music on hold, class 'default', on SIP/208-00000101
-- Executing [158@office1:1] Goto("SIP/115-00000103", "fax,s,1") in new stack
-- Goto (fax,s,1)
-- Executing [s@fax:1] Answer("SIP/115-00000103", "") in new stack
-- Executing [s@fax:2] Set("SIP/115-00000103", "FAXFILE=/mnt/fax_kw12/fax_2010-08-05_10-24-36.tif") in new stack
-- Executing [s@fax:3] ReceiveFAX("SIP/115-00000103", "/mnt/fax_kw12/fax_2010-08-05_10-24-36.tif") in new stack
WARNING[11282]: app_fax.c:432 transmit_audio: channel 'SIP/115-00000103' refused to negotiate T.38
NOTICE[11282]: rtp.c:1146 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP:
-- Stopped music on hold on SIP/208-00000101
== Spawn extension (office1, 115, 1) exited non-zero on 'SIP/115-00000103<ZOMBIE>'
pbx*CLI> core show channels
Channel              Location             State   Application(Data)
SIP/208-00000101     s@fax:3              Up      ReceiveFAX(/mnt/fax_kw12/fax_2
1 active channel
1 active call
185 calls processed
WARNING[11282]: app_fax.c:223 phase_e_handler: Error transmitting fax. result=49: The call dropped prematurely.
WARNING[11282]: app_fax.c:817 transmit: Transmission error
== Spawn extension (fax, s, 3) exited non-zero on 'SIP/208-00000101'
-- Executing [h@fax:1] System("SIP/208-00000101", "chmod 777 /mnt/fax_kw12/fax_2010-08-05_10-24-36.tif") in new stack
-- Executing [h@fax:2] NoOp("SIP/208-00000101", "FAILED") in new stack
-- Executing [h@fax:3] NoOp("SIP/208-00000101", "The call dropped prematurely") in new stack
Comments:By: Paul Belanger (pabelanger) 2010-08-05 05:48:05

Please upload a complete debug log (see below) so we can triage your issue.
We require a complete debug log to help triage the issue.

This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue:


By: Leif Madsen (lmadsen) 2010-08-06 14:16:34

You should not be using attended transfers here. You should be using blind transfer to send the call to ReceiveFax() which you've indicated works.

Additionally, even better yet would really be to use automatic fax detection.

However, we've discussed this and while this MAY be an issue, we can't come up with any logical reason why you would ever do this, because both the blind transfer and automatic fax detection are really the logical solutions to this problem, and an attended transfer in this scenario seems odd.

By: ornix (ornix) 2010-08-09 07:26:23

I've uploaded sip-debug on this call.
Imadsen, may be you are right, but it is rather difficult for users to do both blind and attended transfers. I think faxdetect works only on SIP-2-SIP calls and i've got H.323 lines too.

By: Paul Belanger (pabelanger) 2010-09-04 14:21:02

I see warnings in the debug log that point to a configuration issue.  Please resolve them and upload a new trace.