Incoming Fax-to-email Over SIP w/ T.38

Hi folks,
I’m trying to get inbound faxing working on my install of FreePBX (converted from Trixbox!). I have gotten T.38 to cooperate by ensuring that it was turned on at my SIP provider, and now I’m stuck.

I have a DID routed directly to an extension set to receive faxes. The line picks up and I hear fax tones, and if I watch in the asterisk CLI I see everything appear to move smoothly, then it throws a repeated error that doesn’t mean anything to me at the moment. Here’s an excerpt:

== Using SIP RTP CoS mark 5
    -- Executing [xxx@from-pstn:1] Set("SIP/xxx", "__FROM_DID=xxx") in new stack
    -- Executing [xxx@from-pstn:2] Gosub("SIP/xxx", "app-blacklist-check,s,1()") in new stack
    -- Executing [s@app-blacklist-check:1] GotoIf("SIP/xxx", "0?blacklisted") in new stack
    -- Executing [s@app-blacklist-check:2] Set("SIP/xxx", "CALLED_BLACKLIST=1") in new stack
    -- Executing [s@app-blacklist-check:3] Return("xxx", "") in new stack
    -- Executing [xxx@from-pstn:3] Gosub("xxx", "cidlookup,cidlookup_1,1()") in new stack
    -- Executing [cidlookup_1@cidlookup:1] Set("xxx", "CURLOPT(httptimeout)=7") in new stack
    -- Executing [cidlookup_1@cidlookup:2] Set("SIP/xxx", "CALLERID(name)=") in new stack
    -- Executing [cidlookup_1@cidlookup:3] Return("SIP/xxx", "") in new stack
    -- Executing [xxx@from-pstn:4] Set("SIP/xxx", "CDR(did)=xxx") in new stack
    -- Executing [xxx@from-pstn:5] ExecIf("SIP/xxx", "1 ?Set(CALLERID(name)=xxx)") in new stack
[2012-10-24 13:34:35] WARNING[5923]: func_callerid.c:817 callerpres_read: CALLERPRES is deprecated.  Use CALLERID(name-pres) or CALLERID(num-pres) instead.
    -- Executing [xxx@from-pstn:6] Set("SIP/xxx", "__CALLINGPRES_SV=allowed_not_screened") in new stack
    -- Executing [xxx@from-pstn:7] Set("SIP/xxx", "CALLERPRES()=allowed_not_screened") in new stack
    -- Executing [xxx@from-pstn:8] Goto("SIP/xxx", "ext-fax,100,1") in new stack
    -- Goto (ext-fax,100,1)
    -- Executing [100@ext-fax:1] Set("SIP/xxx", "FAX_FOR=General Mailbox (100)") in new stack
    -- Executing [100@ext-fax:2] NoOp("SIP/xxx", "Receiving Fax for: General Mailbox (100), From: "xxx" <xxx>") in new stack
    -- Executing [100@ext-fax:3] Set("SIP/xxx", "[email protected]") in new stack
    -- Executing [100@ext-fax:4] Goto("SIP/xxx", "s,receivefax") in new stack
    -- Goto (ext-fax,s,3)
    -- Executing [s@ext-fax:3] StopPlayTones("SIP/xxx", "") in new stack
    -- Executing [s@ext-fax:4] ReceiveFAX("SIP/xxx", "/var/spool/asterisk/fax/1351100068.0.tif,f") in new stack
    -- Channel 'SIP/xxx' receiving FAX '/var/spool/asterisk/fax/1351100068.0.tif'
  == Using UDPTL TOS bits 184
  == Using UDPTL CoS mark 5


[2012-10-24 13:34:39] NOTICE[5923]: udptl.c:1092 ast_udptl_write: UDPTL (SIP/xxx): Transmission error to 255.255.255.255:4684: Permission denied
{{repeat previous line about 100x}}


    -- Executing [s@ext-fax:5] ExecIf("SIP/xxx", "1?Set(FAXSTATUS="FAILED: error: Disconnected after permitted retries statusstr: Disconnected after permitted retries")") in new stack
    -- Executing [s@ext-fax:6] Hangup("SIP/xxx", "") in new stack
  == Spawn extension (ext-fax, s, 6) exited non-zero on 'xxx'
    -- Executing [h@ext-fax:1] GotoIf("SIP/xxx", "1?failed") in new stack
    -- Goto (ext-fax,h,103)
    -- Executing [h@ext-fax:103] NoOp("SIP/xxx", "FAX "FAILED: error: Disconnected after permitted retries statusstr: Disconnected after permitted retries" for: [email protected] , From: "xxx" <xxx>") in new stack
    -- Executing [h@ext-fax:104] Macro("SIP/xxx", "hangupcall,") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/xxx", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("SIP/xxx", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("SIP/xxx", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'xxx' in macro 'hangupcall'
  == Spawn extension (ext-fax, h, 104) exited non-zero on 'SIP/xxx'

So from what I can gather here, there is some sort of permission error, but I have no idea where this 255.255.255.255 is coming from - in other people’s posted logs, this seems to point to an IP for their box, but this is all happening on the same PBX.
If anyone has any thoughts or advice to offer, it would be much appreciated!

what version of asterisk are you using and FreePBX?

Have you enabled T38 in the Sip Settings Module yet?

Well, per your log 255.255.255.255:4684, is not a valid IP, so it’s not a permission issue in as much as not a valid destination.

dupe

Hi GordSpence,

We had/have a similar issue.
However, we have found that 99.9% of the time, regardless of what is reported back to the end fax machine or recorded in the logs… the fax is in fact received and a file is successfully created.

Another thing to note is that the user would never know this, as the email notification 90% of the time does not send a notification.

Not sure how to solve this…
Hopefully others have/had the same issues and have resolved.

Unfortunately the file for receiving doesn’t even remain once the fax receive fails. I still don’t know what the 255.255.255.255 is supposed to be referring to…

I just tried a fresh install of FreePBX distro to confirm that it wasn’t some legacy Trixbox setting that got carried over and I’m getting exactly the same error. Could it be related to postfix not being configured properly?

I’m using asterisk 1.8.7 and the latest version of FreePBX (2.10?). I’ve definitely enabled the T38 codec in the SIP settings.

Where is the 255.255.255.255:4684 IP set? What is it supposed to be pointing to? The box itself? Its public IP, or its local IP? The box is behind NAT… Could it be that I’ve mis-entered the NAT settings on the SIP page?