Faxing

I keep seeing this around the forums, but I’m in need of some help. So instead of hijack or necroing a thread, i’m starting my own.

We were using ring central for some of lines (including our fax). Well we getting rid of them and porting everything under our other trunk with the rest of our numbers.

Now currently we have a SPA2012 connected to our fax machine with ring central. I need help getting asterisk properly configured for this.

Currently the extention will ring properly, but the tones that are picked up are not proper fax tones so i’m a bit confused on what i need to do.

I know i’m not providing much info, but thats cause i’m not sure what info to provide.

Then don’t try to use any fax detection in Asterisk (FreePBX) and just rely on:-

A) your vendor is doing t38 correctly.
b) ensure your astrisk does t38 passthrough correctly complete with FAXOPT=gateway.
c) ensure that your endpoint is t38 compliant
d) make sure that there is no echo cancellation or jitter buffer applied to your channel.

This has worked for quite a while. (I think even backported to 1.4) It is really a good idea to only use ulaw or alaw under this scenario.

If you are just doing a g.711 crossbar call you may get some favored response however the long term results will not be spectacular.

If you are a low volume faxer you may find it acceptable.

t.38 gateway functionality was intriduced in Asterisk 1.8

While 1.4 could terminate a t.38 it was not until 1.8 that the t.38 stack got the attention it deserved.

And if you need true T38 functionality, as yet Asterisk even at 10 is still (and will probably always will be) a B2BUA. Using a reasonable SIP proxy will pre-empt the need for Asterisk to terminate the T38 request and deliver it directly to the compliant endpoint. This is of course off-topic in an Asterisk/FreePBX forum but does work as advertised.

if there is something on this from asterisk, then no. Before i even started this I did go looking in https://wiki.asterisk.org/wiki/display/AST/Asterisk+1.8+Documentation

I could not find what I wanted. So i started googling. I have read almost everything in the first 3 pages of this search result.
http://www.google.com/search?q=asterisk+1.8+t.38

I was however able to get faxing working last night with standard g711.

You dohave an installed Digium Fax License I assume?

No i do not. I thought I didn’t need it since I’m not using Res_fax_digium.

This probably will not work. Although Ring Central supports faxing, it is through their servers and delivers the fax to you via email or at a WEB site. The problem is this:

Most SIP implementations heavily compress the audio to reduce bandwidth, while this is not a problem with voice, anything that requires a relatively clean tone will not work. Any recovered audio is fraught with distortion and harmonics as artifacts of the compression and A/D and D/A conversions.

BF

Currently the number with Ring Central does work. Ring cenertal is passing the fax call directly to the SPA and faxing is working to and from that SPA. Now i’m trying to configure asterisk to do the same thing.

Well, you have to bring the Ring Central Trunk into Asterisk, then point an inbound route to your ATA.

Just like any other Trunk/DID/Extension.

BF

I guess i did nother bad explination. Were changing providers so i need to make it work with the new Trunk provider like it does with ring central.

I’ve talked with the new provider and they say it has to be something in our asterisk config cause they do have other customers successfully doing this.

I’ve even been reading on here that people have gotten it working, I’m not just trying to repoduce their success but can not.

Just about every provider has a slightly different requirements for setting up a trunk into asterisk. A single typo in the configuration will prevent it from working.

BF

IT’s not that you did a bad job explaining, you just ommited that point.

DOes the new provider support t.38?

You also omitted you Asterisk and
FFreePBX versions along with how they were installed.

making Asterisk a t.38 Gateway is tricky.

After you said this. I decided to test the fax machine, extension to extension. It actually works. I know the trunk supports faxing I asked before I went with them. I guess i must have something off in the trunk settings, or perhaps something is wrong on there end.

YOu seem to not want to supply information.

OOnce again II asked does your carrier support t.38 Faxing?

WWhat version FFreePBX, AAsterisk and how installed.

PPost your redacted trunk config.

SSorry for odd typing, bug in forum software and AAndroid JJelly BBean

I note:-

[2012-11-01 14:08:34] NOTICE[7784]: chan_sip.c:7527 sip_read: FAX CNG detected but no fax extension

Maybe back to the documentation?

I thought i had said i was going to call the provider and confirm T.38 support since faxing from extension to extension was working, but i must have just thought it and not wrote it.

The provider does support T.38 they do have other customers successfully doing faxing. They are currently looking into things on their end to see they have a miss configuration in out account.

As for our versions. It’s FreePBX 2.10.1.2, Asterisk 1.8.14.0, and it was all installed via the downloadable 64bit ISO from http://www.schmoozecom.com/distro-download.php

For the trunk settings it’s:
type=peer
qualify=yes
nat=yes
host=************************
faxdetect=yes
dtmfmode=rfc2833
disallow=all
context=from-pstn
canrenvite=yes
allow=ulaw&alaw

The trunk config was supplied by our provider.

Edit ---------
I also turned debug on for that extension and then had someone try and send us a fax. Here is the log from that.

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2012.11.01 14:06:01 =~=~=~=~=~=~=~=~=~=~=~=
Reliably Transmitting (no NAT) to 192.168.9.51:5060:
OPTIONS sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.26:5060;branch=z9hG4bK592416ad
Max-Forwards: 70
From: "Unknown" <sip:[email protected]>;tag=as2781236f
To: <sip:[email protected]:5060>
Contact: <sip:[email protected]:5060>
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.10.1(1.8.14.0)
Date: Thu, 01 Nov 2012 18:08:03 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---
pbx1*CLI> 
<--- SIP read from UDP:192.168.9.51:5060 --->
SIP/2.0 200 OK
To: <sip:[email protected]:5060>;tag=a6735c135805d3a1i0
From: "Unknown" <sip:[email protected]>;tag=as2781236f
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Via: SIP/2.0/UDP 192.168.9.26:5060;branch=z9hG4bK592416ad
Server: Linksys/SPA2102-5.2.12
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces

<------------->
--- (10 headers 0 lines) ---
Really destroying SIP dialog '[email protected]:5060' Method: OPTIONS
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [616*******@from-pstn:1] Set("SIP/MainTrunk-000004fc", "__FROM_DID=616*******") in new stack
    -- Executing [616*******@from-pstn:2] Gosub("SIP/MainTrunk-000004fc", "app-blacklist-check,s,1()") in new stack
    -- Executing [s@app-blacklist-check:1] GotoIf("SIP/MainTrunk-000004fc", "0?blacklisted") in new stack
    -- Executing [s@app-blacklist-check:2] Set("SIP/MainTrunk-000004fc", "CALLED_BLACKLIST=1") in new stack
    -- Executing [s@app-blacklist-check:3] Return("SIP/MainTrunk-000004fc", "") in new stack
    -- Executing [616*******@from-pstn:3] Set("SIP/MainTrunk-000004fc", "CDR(did)=616*******") in new stack
    -- Executing [616*******@from-pstn:4] ExecIf("SIP/MainTrunk-000004fc", "0 ?Set(CALLERID(name)=18009806858)") in new stack
    -- Executing [616*******@from-pstn:5] Set("SIP/MainTrunk-000004fc", "__CALLINGPRES_SV=allowed_not_screened") in new stack
    -- Executing [616*******@from-pstn:6] Set("SIP/MainTrunk-000004fc", "CALLERPRES()=allowed_not_screened") in new stack
    -- Executing [616*******@from-pstn:7] Goto("SIP/MainTrunk-000004fc", "from-did-direct,3200,1") in new stack
    -- Goto (from-did-direct,3200,1)
    -- Executing [3200@from-did-direct:1] Set("SIP/MainTrunk-000004fc", "__RINGTIMER=15") in new stack
    -- Executing [3200@from-did-direct:2] Macro("SIP/MainTrunk-000004fc", "exten-vm,novm,3200,0,0,0") in new stack
    -- Executing [s@macro-exten-vm:1] Macro("SIP/MainTrunk-000004fc", "user-callerid,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/MainTrunk-000004fc", "AMPUSER=18009806858") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/MainTrunk-000004fc", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/MainTrunk-000004fc", "1?Set(REALCALLERIDNUM=18009806858)") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/MainTrunk-000004fc", "AMPUSER=") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/MainTrunk-000004fc", "AMPUSERCIDNAME=") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/MainTrunk-000004fc", "1?report") in new stack
    -- Goto (macro-user-callerid,s,13)
    -- Executing [s@macro-user-callerid:13] GotoIf("SIP/MainTrunk-000004fc", "0?continue") in new stack
    -- Executing [s@macro-user-callerid:14] Set("SIP/MainTrunk-000004fc", "__TTL=64") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("SIP/MainTrunk-000004fc", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,26)
    -- Executing [s@macro-user-callerid:26] Set("SIP/MainTrunk-000004fc", "CALLERID(number)=18009806858") in new stack
    -- Executing [s@macro-user-callerid:27] Set("SIP/MainTrunk-000004fc", "CALLERID(name)=TOLL FREE") in new stack
    -- Executing [s@macro-user-callerid:28] Set("SIP/MainTrunk-000004fc", "CHANNEL(language)=en") in new stack
    -- Executing [s@macro-exten-vm:2] Set("SIP/MainTrunk-000004fc", "RingGroupMethod=none") in new stack
    -- Executing [s@macro-exten-vm:3] Set("SIP/MainTrunk-000004fc", "__EXTTOCALL=3200") in new stack
    -- Executing [s@macro-exten-vm:4] Set("SIP/MainTrunk-000004fc", "__PICKUPMARK=3200") in new stack
    -- Executing [s@macro-exten-vm:5] Set("SIP/MainTrunk-000004fc", "RT=") in new stack
    -- Executing [s@macro-exten-vm:6] Gosub("SIP/MainTrunk-000004fc", "sub-record-check,s,1(exten,3200,)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("SIP/MainTrunk-000004fc", "1?check") in new stack
    -- Goto (sub-record-check,s,6)
    -- Executing [s@sub-record-check:6] Set("SIP/MainTrunk-000004fc", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:7] GotoIf("SIP/MainTrunk-000004fc", "1?next") in new stack
    -- Goto (sub-record-check,s,10)
    -- Executing [s@sub-record-check:10] ExecIf("SIP/MainTrunk-000004fc", "0?Return()") in new stack
    -- Executing [s@sub-record-check:11] GotoIf("SIP/MainTrunk-000004fc", "0?exten,1") in new stack
    -- Executing [s@sub-record-check:12] Set("SIP/MainTrunk-000004fc", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("SIP/MainTrunk-000004fc", "0?Set(__REC_POLICY_MODE=)") in new stack
    -- Executing [s@sub-record-check:14] Set("SIP/MainTrunk-000004fc", "NOW=1351793300") in new stack
    -- Executing [s@sub-record-check:15] Set("SIP/MainTrunk-000004fc", "__DAY=01") in new stack
    -- Executing [s@sub-record-check:16] Set("SIP/MainTrunk-000004fc", "__MONTH=11") in new stack
    -- Executing [s@sub-record-check:17] Set("SIP/MainTrunk-000004fc", "__YEAR=2012") in new stack
    -- Executing [s@sub-record-check:18] Set("SIP/MainTrunk-000004fc", "__TIMESTR=20121101-140820") in new stack
    -- Executing [s@sub-record-check:19] Set("SIP/MainTrunk-000004fc", "__FROMEXTEN=18009806858") in new stack
    -- Executing [s@sub-record-check:20] Set("SIP/MainTrunk-000004fc", "__CALLFILENAME=exten-3200-18009806858-20121101-140820-1351793300.2168") in new stack
    -- Executing [s@sub-record-check:21] Goto("SIP/MainTrunk-000004fc", "exten,1") in new stack
    -- Goto (sub-record-check,exten,1)
    -- Executing [exten@sub-record-check:1] GotoIf("SIP/MainTrunk-000004fc", "0?callee") in new stack
    -- Executing [exten@sub-record-check:2] Set("SIP/MainTrunk-000004fc", "__REC_POLICY_MODE=never") in new stack
    -- Executing [exten@sub-record-check:3] GotoIf("SIP/MainTrunk-000004fc", "0?caller") in new stack
    -- Executing [exten@sub-record-check:4] GotoIf("SIP/MainTrunk-000004fc", "1?callee") in new stack
    -- Goto (sub-record-check,exten,8)
    -- Executing [exten@sub-record-check:8] GosubIf("SIP/MainTrunk-000004fc", "0?record,1(exten,3200,18009806858)") in new stack
    -- Executing [exten@sub-record-check:9] Return("SIP/MainTrunk-000004fc", "") in new stack
    -- Executing [s@macro-exten-vm:7] GotoIf("SIP/MainTrunk-000004fc", "1?macrodial") in new stack
    -- Goto (macro-exten-vm,s,13)
    -- Executing [s@macro-exten-vm:13] GosubIf("SIP/MainTrunk-000004fc", "0?clrheader,1()") in new stack
    -- Executing [s@macro-exten-vm:14] Macro("SIP/MainTrunk-000004fc", "dial-one,,tr,3200") in new stack
    -- Executing [s@macro-dial-one:1] Set("SIP/MainTrunk-000004fc", "DEXTEN=3200") in new stack
    -- Executing [s@macro-dial-one:2] Set("SIP/MainTrunk-000004fc", "DIALSTATUS_CW=") in new stack
    -- Executing [s@macro-dial-one:3] GosubIf("SIP/MainTrunk-000004fc", "0?screen,1()") in new stack
    -- Executing [s@macro-dial-one:4] GosubIf("SIP/MainTrunk-000004fc", "0?cf,1()") in new stack
    -- Executing [s@macro-dial-one:5] GotoIf("SIP/MainTrunk-000004fc", "1?skip1") in new stack
    -- Goto (macro-dial-one,s,8)
    -- Executing [s@macro-dial-one:8] GotoIf("SIP/MainTrunk-000004fc", "0?nodial") in new stack
    -- Executing [s@macro-dial-one:9] GotoIf("SIP/MainTrunk-000004fc", "0?continue") in new stack
    -- Executing [s@macro-dial-one:10] Set("SIP/MainTrunk-000004fc", "EXTHASCW=ENABLED") in new stack
    -- Executing [s@macro-dial-one:11] GotoIf("SIP/MainTrunk-000004fc", "0?next1:cwinusebusy") in new stack
    -- Goto (macro-dial-one,s,23)
    -- Executing [s@macro-dial-one:23] GotoIf("SIP/MainTrunk-000004fc", "1?next3:continue") in new stack
    -- Goto (macro-dial-one,s,24)
    -- Executing [s@macro-dial-one:24] ExecIf("SIP/MainTrunk-000004fc", "0?Set(DIALSTATUS_CW=BUSY)") in new stack
    -- Executing [s@macro-dial-one:25] GotoIf("SIP/MainTrunk-000004fc", "0?nodial") in new stack
    -- Executing [s@macro-dial-one:26] GosubIf("SIP/MainTrunk-000004fc", "1?dstring,1():dlocal,1()") in new stack
    -- Executing [dstring@macro-dial-one:1] Set("SIP/MainTrunk-000004fc", "DSTRING=") in new stack
    -- Executing [dstring@macro-dial-one:2] Set("SIP/MainTrunk-000004fc", "DEVICES=3200") in new stack
    -- Executing [dstring@macro-dial-one:3] ExecIf("SIP/MainTrunk-000004fc", "0?Return()") in new stack
    -- Executing [dstring@macro-dial-one:4] ExecIf("SIP/MainTrunk-000004fc", "0?Set(DEVICES=200)") in new stack
    -- Executing [dstring@macro-dial-one:5] Set("SIP/MainTrunk-000004fc", "LOOPCNT=1") in new stack
    -- Executing [dstring@macro-dial-one:6] Set("SIP/MainTrunk-000004fc", "ITER=1") in new stack
    -- Executing [dstring@macro-dial-one:7] Set("SIP/MainTrunk-000004fc", "THISDIAL=SIP/3200") in new stack
    -- Executing [dstring@macro-dial-one:8] GosubIf("SIP/MainTrunk-000004fc", "1?zap2dahdi,1()") in new stack
    -- Executing [zap2dahdi@macro-dial-one:1] ExecIf("SIP/MainTrunk-000004fc", "0?Return()") in new stack
    -- Executing [zap2dahdi@macro-dial-one:2] Set("SIP/MainTrunk-000004fc", "NEWDIAL=") in new stack
    -- Executing [zap2dahdi@macro-dial-one:3] Set("SIP/MainTrunk-000004fc", "LOOPCNT2=1") in new stack
    -- Executing [zap2dahdi@macro-dial-one:4] Set("SIP/MainTrunk-000004fc", "ITER2=1") in new stack
    -- Executing [zap2dahdi@macro-dial-one:5] Set("SIP/MainTrunk-000004fc", "THISPART2=SIP/3200") in new stack
    -- Executing [zap2dahdi@macro-dial-one:6] ExecIf("SIP/MainTrunk-000004fc", "0?Set(THISPART2=DAHDI/3200)") in new stack
    -- Executing [zap2dahdi@macro-dial-one:7] Set("SIP/MainTrunk-000004fc", "NEWDIAL=SIP/3200&") in new stack
    -- Executing [zap2dahdi@macro-dial-one:8] Set("SIP/MainTrunk-000004fc", "ITER2=2") in new stack
    -- Executing [zap2dahdi@macro-dial-one:9] GotoIf("SIP/MainTrunk-000004fc", "0?begin2") in new stack
    -- Executing [zap2dahdi@macro-dial-one:10] Set("SIP/MainTrunk-000004fc", "THISDIAL=SIP/3200") in new stack
    -- Executing [zap2dahdi@macro-dial-one:11] Return("SIP/MainTrunk-000004fc", "") in new stack
    -- Executing [dstring@macro-dial-one:9] Set("SIP/MainTrunk-000004fc", "DSTRING=SIP/3200&") in new stack
    -- Executing [dstring@macro-dial-one:10] Set("SIP/MainTrunk-000004fc", "ITER=2") in new stack
    -- Executing [dstring@macro-dial-one:11] GotoIf("SIP/MainTrunk-000004fc", "0?begin") in new stack
    -- Executing [dstring@macro-dial-one:12] Set("SIP/MainTrunk-000004fc", "DSTRING=SIP/3200") in new stack
    -- Executing [dstring@macro-dial-one:13] Return("SIP/MainTrunk-000004fc", "") in new stack
    -- Executing [s@macro-dial-one:27] GotoIf("SIP/MainTrunk-000004fc", "0?nodial") in new stack
    -- Executing [s@macro-dial-one:28] GotoIf("SIP/MainTrunk-000004fc", "0?skiptrace") in new stack
    -- Executing [s@macro-dial-one:29] GosubIf("SIP/MainTrunk-000004fc", "1?ctset,1():ctclear,1()") in new stack
    -- Executing [ctset@macro-dial-one:1] Set("SIP/MainTrunk-000004fc", "DB(CALLTRACE/3200)=18009806858") in new stack
    -- Executing [ctset@macro-dial-one:2] Return("SIP/MainTrunk-000004fc", "") in new stack
    -- Executing [s@macro-dial-one:30] Set("SIP/MainTrunk-000004fc", "D_OPTIONS=tr") in new stack
    -- Executing [s@macro-dial-one:31] ExecIf("SIP/MainTrunk-000004fc", "0?SIPAddHeader(Alert-Info: )") in new stack
    -- Executing [s@macro-dial-one:32] ExecIf("SIP/MainTrunk-000004fc", "0?SIPAddHeader()") in new stack
    -- Executing [s@macro-dial-one:33] ExecIf("SIP/MainTrunk-000004fc", "0?Set(CHANNEL(musicclass)=)") in new stack
    -- Executing [s@macro-dial-one:34] GosubIf("SIP/MainTrunk-000004fc", "0?qwait,1()") in new stack
    -- Executing [s@macro-dial-one:35] Set("SIP/MainTrunk-000004fc", "__CWIGNORE=") in new stack
    -- Executing [s@macro-dial-one:36] Set("SIP/MainTrunk-000004fc", "__KEEPCID=TRUE") in new stack
    -- Executing [s@macro-dial-one:37] GotoIf("SIP/MainTrunk-000004fc", "0?usegoto,1") in new stack
    -- Executing [s@macro-dial-one:38] GotoIf("SIP/MainTrunk-000004fc", "1?godial") in new stack
    -- Goto (macro-dial-one,s,42)
    -- Executing [s@macro-dial-one:42] Dial("SIP/MainTrunk-000004fc", "SIP/3200,,tr") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
Audio is at 11400
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.9.51:5060:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.26:5060;branch=z9hG4bK3b6fa638
Max-Forwards: 70
From: "TOLL FREE" <sip:[email protected]>;tag=as15678ef6
To: <sip:[email protected]:5060>
Contact: <sip:[email protected]:5060>
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-2.10.1(1.8.14.0)
Date: Thu, 01 Nov 2012 18:08:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 233

v=0
o=root 91852763 91852763 IN IP4 192.168.9.26
s=Asterisk PBX 1.8.14.0
c=IN IP4 192.168.9.26
t=0 0
m=audio 11400 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
    -- Called SIP/3200
pbx1*CLI> 
<--- SIP read from UDP:192.168.9.51:5060 --->
SIP/2.0 100 Trying
To: <sip:[email protected]:5060>
From: "TOLL FREE" <sip:[email protected]>;tag=as15678ef6
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Via: SIP/2.0/UDP 192.168.9.26:5060;branch=z9hG4bK3b6fa638
Server: Linksys/SPA2102-5.2.12
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
<--- SIP read from UDP:192.168.9.51:5060 --->
SIP/2.0 180 Ringing
To: <sip:[email protected]:5060>;tag=dafe9ab69a06ac28i0
From: "TOLL FREE" <sip:[email protected]>;tag=as15678ef6
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Via: SIP/2.0/UDP 192.168.9.26:5060;branch=z9hG4bK3b6fa638
Contact: "MSC Fax" <sip:[email protected]:5060>
Server: Linksys/SPA2102-5.2.12
Remote-Party-ID: "MSC Fax" <sip:[email protected]>;screen=yes;party=called
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
list_route: hop: <sip:[email protected]:5060>
    -- SIP/3200-000004fd is ringing
<--- SIP read from UDP:192.168.9.51:5060 --->
SIP/2.0 200 OK
To: <sip:[email protected]:5060>;tag=dafe9ab69a06ac28i0
From: "TOLL FREE" <sip:[email protected]>;tag=as15678ef6
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Via: SIP/2.0/UDP 192.168.9.26:5060;branch=z9hG4bK3b6fa638
Contact: "MSC Fax" <sip:[email protected]:5060>
Server: Linksys/SPA2102-5.2.12
Remote-Party-ID: "MSC Fax" <sip:[email protected]>;screen=yes;party=called
Content-Length: 251
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces
Content-Type: application/sdp

v=0
o=- 83175 83175 IN IP4 192.168.9.51
s=-
c=IN IP4 192.168.9.51
t=0 0
m=audio 14168 RTP/AVP 0 100 101
a=rtpmap:0 PCMU/8000
a=rtpmap:100 NSE/8000
a=fmtp:100 192-193
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
<------------->
--- (13 headers 13 lines) ---
Found RTP audio format 0
Found RTP audio format 100
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found unknown media description format NSE for ID 100
Found audio description format telephone-event for ID 101
Capabilities: us - 0x4 (ulaw), peer - audio=0x4 (ulaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.9.51:14168
list_route: hop: <sip:[email protected]:5060>
set_destination: Parsing <sip:[email protected]:5060> for address/port to send to
set_destination: set destination to 192.168.9.51:5060
Transmitting (no NAT) to 192.168.9.51:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.26:5060;branch=z9hG4bK69cb9dbd
Max-Forwards: 70
From: "TOLL FREE" <sip:[email protected]>;tag=as15678ef6
To: <sip:[email protected]:5060>;tag=dafe9ab69a06ac28i0
Contact: <sip:[email protected]:5060>
Call-ID: [email protected]:5060
CSeq: 102 ACK
User-Agent: FPBX-2.10.1(1.8.14.0)
Content-Length: 0


---
    -- SIP/3200-000004fd answered SIP/MainTrunk-000004fc
[2012-11-01 14:08:34] NOTICE[7784]: chan_sip.c:7527 sip_read: FAX CNG detected but no fax extension
[2012-11-01 14:08:34] WARNING[7784]: res_rtp_asterisk.c:661 ast_rtp_dtmf_begin: Don't know how to represent 'f'
[2012-11-01 14:08:34] WARNING[7784]: res_rtp_asterisk.c:775 ast_rtp_dtmf_end_with_duration: Don't know how to represent 'f'
<--- SIP read from UDP:192.168.9.51:5060 --->
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.51:5060;branch=z9hG4bK-20158bc2
From: <sip:[email protected]>;tag=dafe9ab69a06ac28i0
To: "TOLL FREE" <sip:[email protected]>;tag=as15678ef6
Remote-Party-ID: "MSC Fax" <sip:[email protected]>;screen=yes;party=called
Call-ID: [email protected]:5060
CSeq: 101 INVITE
Max-Forwards: 70
Contact: "MSC Fax" <sip:[email protected]:5060>
Expires: 30
User-Agent: Linksys/SPA2102-5.2.12
Content-Length: 263
Content-Type: application/sdp

v=0
o=- 84689 84689 IN IP4 192.168.9.51
s=-
c=IN IP4 192.168.9.51
t=0 0
m=image 14168 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:200
a=T38FaxMaxDatagram:200
a=T38FaxUdpEC:t38UDPRedundancy
<------------->
--- (13 headers 12 lines) ---
Sending to 192.168.9.51:5060 (no NAT)
  == Using UDPTL TOS bits 184
  == Using UDPTL CoS mark 5
Got T.38 offer in SDP in dialog [email protected]:5060
Capabilities: us - 0x4 (ulaw), peer - audio=0x0 (nothing)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x0 (nothing)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x0 (nothing), combined - 0x0 (nothing)
Got T.38 Re-invite without audio. Keeping RTP active during T.38 session.
<--- Transmitting (no NAT) to 192.168.9.51:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.9.51:5060;branch=z9hG4bK-20158bc2;received=192.168.9.51
From: <sip:[email protected]>;tag=dafe9ab69a06ac28i0
To: "TOLL FREE" <sip:[email protected]>;tag=as15678ef6
Call-ID: [email protected]:5060
CSeq: 101 INVITE
Server: FPBX-2.10.1(1.8.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Length: 0


<------------>
  == Using UDPTL TOS bits 184
  == Using UDPTL CoS mark 5
<--- Reliably Transmitting (no NAT) to 192.168.9.51:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.9.51:5060;branch=z9hG4bK-20158bc2;received=192.168.9.51
From: <sip:[email protected]>;tag=dafe9ab69a06ac28i0
To: "TOLL FREE" <sip:[email protected]>;tag=as15678ef6
Call-ID: [email protected]:5060
CSeq: 101 INVITE
Server: FPBX-2.10.1(1.8.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 268

v=0
o=root 91852763 91852764 IN IP4 192.168.9.26
s=Asterisk PBX 1.8.14.0
c=IN IP4 192.168.9.26
t=0 0
m=image 4554 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxDatagram:330
a=T38FaxUdpEC:t38UDPRedundancy

<------------>
<--- SIP read from UDP:192.168.9.51:5060 --->
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.51:5060;branch=z9hG4bK-ddff948f
From: <sip:[email protected]>;tag=dafe9ab69a06ac28i0
To: "TOLL FREE" <sip:[email protected]>;tag=as15678ef6
Call-ID: [email protected]:5060
CSeq: 101 ACK
Max-Forwards: 70
Contact: "MSC Fax" <sip:[email protected]:5060>
User-Agent: Linksys/SPA2102-5.2.12
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
Reliably Transmitting (no NAT) to 192.168.9.51:5060:
OPTIONS sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.26:5060;branch=z9hG4bK573027b2
Max-Forwards: 70
From: "Unknown" <sip:[email protected]>;tag=as04566547
To: <sip:[email protected]:5060>
Contact: <sip:[email protected]:5060>
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.10.1(1.8.14.0)
Date: Thu, 01 Nov 2012 18:09:03 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---
<--- SIP read from UDP:192.168.9.51:5060 --->
SIP/2.0 486 Busy Here
To: <sip:[email protected]:5060>;tag=a6735c135805d3a1i0
From: "Unknown" <sip:[email protected]>;tag=as04566547
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Via: SIP/2.0/UDP 192.168.9.26:5060;branch=z9hG4bK573027b2
Server: Linksys/SPA2102-5.2.12
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces

<------------->
--- (10 headers 0 lines) ---
Really destroying SIP dialog '[email protected]:5060' Method: OPTIONS
<--- SIP read from UDP:192.168.9.51:5060 --->
BYE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.51:5060;branch=z9hG4bK-f645eb7d
From: <sip:[email protected]>;tag=dafe9ab69a06ac28i0
To: "TOLL FREE" <sip:[email protected]>;tag=as15678ef6
Call-ID: [email protected]:5060
CSeq: 102 BYE
Max-Forwards: 70
User-Agent: Linksys/SPA2102-5.2.12
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Sending to 192.168.9.51:5060 (no NAT)
Scheduling destruction of SIP dialog '[email protected]:5060' in 6400 ms (Method: BYE)
<--- Transmitting (no NAT) to 192.168.9.51:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.9.51:5060;branch=z9hG4bK-f645eb7d;received=192.168.9.51
From: <sip:[email protected]>;tag=dafe9ab69a06ac28i0
To: "TOLL FREE" <sip:[email protected]>;tag=as15678ef6
Call-ID: [email protected]:5060
CSeq: 102 BYE
Server: FPBX-2.10.1(1.8.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


<
------------>
    -- Executing [h@macro-dial-one:1] Macro("SIP/MainTrunk-000004fc", "hangupcall,") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/MainTrunk-000004fc", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("SIP/MainTrunk-000004fc", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("SIP/MainTrunk-000004fc", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/MainTrunk-000004fc' in macro 'hangupcall'
  == Spawn extension (macro-dial-one, h, 1) exited non-zero on 'SIP/MainTrunk-000004fc'
  == Spawn extension (macro-dial-one, s, 42) exited non-zero on 'SIP/MainTrunk-000004fc' in macro 'dial-one'
  == Spawn extension (macro-exten-vm, s, 14) exited non-zero on 'SIP/MainTrunk-000004fc' in macro 'exten-vm'
  == Spawn extension (from-did-direct, 3200, 2) exited non-zero on 'SIP/MainTrunk-000004fc'

Actually you have a bit of a mess, your trunk is not working as the call is coming from unknown.

Also FAX detect is an analog option not t.38. Since the DID should be statically routed to a fax, fax detection is going to mess things up.

I think you are confusing the systems ability to emulate an analog FAX and email it the document with the Asterisk t.38 relay feature.

You want t.38 relay since the SPA is where you want the call to terminate. Your call is to have Asterisk pass the FAX through transparently, preserving the t.38 encapsulation.

The “FAX CNG detected but no fax extension” I thought i did not need to specify a fax extension for this inbound route since it goes to the SPA? I didn’t put one in because I saw the fax detect on the route was for if you received both faxes and voice call on that line, and was suppose to be no if you receive voice OR fax exclusively.

As for the trunk, it’s always been that way. There is actually no registration string for the trunk. So it always appears as anonymous. I’ve removed the faxdetect from the trunk.

Now for the t.38 relay where should i look at in the settings or if you know of a better documentation to look at.

You don’t need to register for a trunk to be detected. It just has to match the inbound SIP invite.

I don’t know how you will ever get this to work if you can’t match the trunk and set the t38udtpl parameter.

Have you read Asterisk t.38 documentation?