Asterisk T.38 Gateway

Asterisk T.38 Gateway testing


Asterisk T.38 Gateway code is now in Asterisk 10
WIKI https://wiki.asterisk.org/wiki/display/AST/T.38+Fax+Gateway

When running a SIP-DAHDI (ISDN) gateway it is mostly sufficient to set the FAXOPT variable in the SIP trunk. The gateway module detects T38 re-INVITES and also detects the fax tone and starts a t38 session. When no activity is detected with ten seconds the gateway module detaches itself from the channel.

 [mypeer]
type=peer
host=dynamic
secret=chooseabetterpassword
context=default
setvar=FAXOPT(gateway)=yes,10

Older Asterisk versions need to be patched for t38
Reviewboard https://reviewboard.asterisk.org/r/1116
Note: Above patch works with chan_dahdi and chan_iax. If you use other channel drivers and the T.38 reINVITE is rejected by Asterisk with 488 (approx. 4 seconds after the reINVITE was received) then the channel driver need to be changed to return -1 on T38-request indication. Just take a look at the patch how it modified chan_iax.c and apply this similarily to your channel driver.

Note: Most ATAs do not support FEC, but only Redundancy. Some ATAs just ignore FEC, other do not even work at all. Thus, usually it is a good idea to configure Asterisk to use Redundancy instead of FEC (default): add to sip.conf: t38pt_udptl = yes,redundancy,maxdatagram=400


topology 1

ATA1 --SIP+T.38-- SS7BOX1 --ss7-- SS7BOX2 --SIP+T38-- ATA2
call direction ->
ATA1(CALLER) FIRMWARE NAT ASTERISK VERSION BOX1/BOX2 ATA2/GW(CALLED) FIRMWARE NAT works? notes
Grandstream HT502 1.0.1.57 yes Asterisk 1.6.2.7/1.6.2.7 interbell IBG-130 ? yes yes
linksys spa 2102 5.2.5 yes Asterisk 1.6.2.7/1.6.2.7 interbell IBG-130 ? yes yes
Patton SN4524 5.5 yes Asterisk 1.6.2.7/1.6.2.7 Grandstream HT502 1.0.1.57 yes yes
linksys spa 3102 5.1.10 no Asterisk 1.6.2.7/1.6.2.7 linksys spa 2102 5.1.12 yes yes






topology 2

ATA1 -->SIP+T.38-- SS7BOX1 --ss7-- SS7BOX2 - ReceiveFax/SendFax
outgoing ->, incoming <-

ATA1(CALLER) FIRMWARE NAT ASTERISK VERSION BOX1/BOX2 spandsp/fax for asterisk works? notes
Grandstream HT502 1.0.1.57 yes Asterisk 1.6.2.7/ Asterisk 1.6.2.7 0.6pre17 yes
linksys spa 2102 ? yes Asterisk 1.6.2.7/ Asterisk 1.6.2.7 0.6pre17 yes
linksys spa 3102 5.1.10 no Asterisk 1.6.2.7/ Asterisk 1.6.2.7 0.6pre17 yes



topology 3

ATA1 --SIP+T.38-- SS7BOX1 --ss7-- SS7BOX2 - TDM - analog Fax
outgoing ->, incoming <-
ATA1(CALLER) FIRMWARE NAT ASTERISK VERSION BOX1 works? notes
Grandstream HT502 1.0.1.57 yes Asterisk 1.6.2.7 ?
Linksys SPA 2102 5.1.12 yes Asterisk 1.6.2.7 yes/no only one way ata <--- tdm



topology 4

ATA1 --SIP+T.38 - PBX(asterisk) - sip proxy(kamailio)-- SS7BOX1 --ss7-- SS7BOX2 - SIP+T.38 - ATA2
outgoing ->, incoming <-
ATA1(CALLER) FIRMWARE NAT PBX SIP PROXY ASTERISK VERSION BOX1/BOX2 ATA2 NAT works? notes
Grandstream HT502 1.0.1.57 yes Asterisk 1.6.2.7 kamailio 3.0.2 Asterisk 1.6.2.7/ Asterisk 1.6.2.7 linksys yes ?



topology 5

ATA1 --SIP+T.38--Astersk-- PRI E1-- Carrier--PRI E1-- Asterisk --SIP+T38-- ATA2
ATA1 --SIP+T.38--Astersk-- PRI E1-- Carrier — AnalogFax
call direction ->
ATA1(CALLER) FIRMWARE NAT ASTERISK VERSION BOX1/BOX2 ATA2/GW(CALLED) FIRMWARE NAT works? notes
Grandstream HT502 1.0.1.63 yes Asterisk 1.6.2.13/1.6.2.13 Grandstream HT502 1.0.1.63 yes yes


In this tipology we have use the patch t38gateway for asterisk 1.6.2.9

N.B. The GrandStream firmware 1.0.1.63 have a new features: "Disable Line Echo Canceller (LEC)".
This features is "No" by default, and if the echo canceller is active the fax service doesn't work very well: the fax machine report is ok, but some pages are jumped.
To solve this problem you must disable the Echo Canceller on the Grandstream HT502 putting the feature to Yes

Asterisk T.38 Gateway testing


Asterisk T.38 Gateway code is now in Asterisk 10
WIKI https://wiki.asterisk.org/wiki/display/AST/T.38+Fax+Gateway

When running a SIP-DAHDI (ISDN) gateway it is mostly sufficient to set the FAXOPT variable in the SIP trunk. The gateway module detects T38 re-INVITES and also detects the fax tone and starts a t38 session. When no activity is detected with ten seconds the gateway module detaches itself from the channel.

 [mypeer]
type=peer
host=dynamic
secret=chooseabetterpassword
context=default
setvar=FAXOPT(gateway)=yes,10

Older Asterisk versions need to be patched for t38
Reviewboard https://reviewboard.asterisk.org/r/1116
Note: Above patch works with chan_dahdi and chan_iax. If you use other channel drivers and the T.38 reINVITE is rejected by Asterisk with 488 (approx. 4 seconds after the reINVITE was received) then the channel driver need to be changed to return -1 on T38-request indication. Just take a look at the patch how it modified chan_iax.c and apply this similarily to your channel driver.

Note: Most ATAs do not support FEC, but only Redundancy. Some ATAs just ignore FEC, other do not even work at all. Thus, usually it is a good idea to configure Asterisk to use Redundancy instead of FEC (default): add to sip.conf: t38pt_udptl = yes,redundancy,maxdatagram=400


topology 1

ATA1 --SIP+T.38-- SS7BOX1 --ss7-- SS7BOX2 --SIP+T38-- ATA2
call direction ->
ATA1(CALLER) FIRMWARE NAT ASTERISK VERSION BOX1/BOX2 ATA2/GW(CALLED) FIRMWARE NAT works? notes
Grandstream HT502 1.0.1.57 yes Asterisk 1.6.2.7/1.6.2.7 interbell IBG-130 ? yes yes
linksys spa 2102 5.2.5 yes Asterisk 1.6.2.7/1.6.2.7 interbell IBG-130 ? yes yes
Patton SN4524 5.5 yes Asterisk 1.6.2.7/1.6.2.7 Grandstream HT502 1.0.1.57 yes yes
linksys spa 3102 5.1.10 no Asterisk 1.6.2.7/1.6.2.7 linksys spa 2102 5.1.12 yes yes






topology 2

ATA1 -->SIP+T.38-- SS7BOX1 --ss7-- SS7BOX2 - ReceiveFax/SendFax
outgoing ->, incoming <-

ATA1(CALLER) FIRMWARE NAT ASTERISK VERSION BOX1/BOX2 spandsp/fax for asterisk works? notes
Grandstream HT502 1.0.1.57 yes Asterisk 1.6.2.7/ Asterisk 1.6.2.7 0.6pre17 yes
linksys spa 2102 ? yes Asterisk 1.6.2.7/ Asterisk 1.6.2.7 0.6pre17 yes
linksys spa 3102 5.1.10 no Asterisk 1.6.2.7/ Asterisk 1.6.2.7 0.6pre17 yes



topology 3

ATA1 --SIP+T.38-- SS7BOX1 --ss7-- SS7BOX2 - TDM - analog Fax
outgoing ->, incoming <-
ATA1(CALLER) FIRMWARE NAT ASTERISK VERSION BOX1 works? notes
Grandstream HT502 1.0.1.57 yes Asterisk 1.6.2.7 ?
Linksys SPA 2102 5.1.12 yes Asterisk 1.6.2.7 yes/no only one way ata <--- tdm



topology 4

ATA1 --SIP+T.38 - PBX(asterisk) - sip proxy(kamailio)-- SS7BOX1 --ss7-- SS7BOX2 - SIP+T.38 - ATA2
outgoing ->, incoming <-
ATA1(CALLER) FIRMWARE NAT PBX SIP PROXY ASTERISK VERSION BOX1/BOX2 ATA2 NAT works? notes
Grandstream HT502 1.0.1.57 yes Asterisk 1.6.2.7 kamailio 3.0.2 Asterisk 1.6.2.7/ Asterisk 1.6.2.7 linksys yes ?



topology 5

ATA1 --SIP+T.38--Astersk-- PRI E1-- Carrier--PRI E1-- Asterisk --SIP+T38-- ATA2
ATA1 --SIP+T.38--Astersk-- PRI E1-- Carrier — AnalogFax
call direction ->
ATA1(CALLER) FIRMWARE NAT ASTERISK VERSION BOX1/BOX2 ATA2/GW(CALLED) FIRMWARE NAT works? notes
Grandstream HT502 1.0.1.63 yes Asterisk 1.6.2.13/1.6.2.13 Grandstream HT502 1.0.1.63 yes yes


In this tipology we have use the patch t38gateway for asterisk 1.6.2.9

N.B. The GrandStream firmware 1.0.1.63 have a new features: "Disable Line Echo Canceller (LEC)".
This features is "No" by default, and if the echo canceller is active the fax service doesn't work very well: the fax machine report is ok, but some pages are jumped.
To solve this problem you must disable the Echo Canceller on the Grandstream HT502 putting the feature to Yes

Created by: cervajs, Last modification: Tue 11 of Sep, 2012 (17:50 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+