Asterisk T.38
Created by: cervajs,Last modification on Mon 11 of Aug, 2008 [13:26 UTC] by JustRumours
Be aware: T.38 is not T.38, there are still a great many interoperability issues out there!
A: See below
Q: Can I terminate T.38 calls to PSTN with Asterisk T.38 passthrough(via Zaptel)?
A: yes, http://bugs.digium.com/view.php?id=12931
CallWeaver supports T.38 termination and gateway operation.
/*!< This is default: NO MMR and JBIG trancoding, NO fill bit removal, transferredTCF TCF, UDP FEC, Version 0 and 9600 max fax rate */
static int global_t38_capability = T38FAX_VERSION_0 | T38FAX_RATE_2400 | T38FAX_RATE_4800 | T38FAX_RATE_7200 | T38FAX_RATE_9600;
To make changes to the T38 configuration, simply add in the changes as described in the sections above that line. For example, if you need T38FAX_VERSION_1 simply edit the file and change the 0 to 1. If you can support 12000 and 14400, simply add it to the end of the line. An example configuration with T38 verison 1 and adding 12000 and 14400 follows:
static int global_t38_capability = T38FAX_VERSION_1 | T38FAX_RATE_2400 | T38FAX_RATE_4800 | T38FAX_RATE_7200 | T38FAX_RATE_9600 | T38FAX_RATE_12000 | T38FAX_RATE_14400;
svn checkout http://svn.digium.com/svn/asterisk/branches/1.4 asterisk-1.4
(or for trunk:
svn checkout http://svn.digium.com/svn/asterisk/trunk asterisk-trunk
)
cd asterisk-1.4 (cd asterisk-trunk)
./configure;make;make install
asterisk -vvvdc
[general]
;NEEDED!!!
t38pt_udptl = yes
[200]
type=friend
context=from-sip
host=dynamic
secret=200
canreinvite=yes
t38pt_udptl = yes
or take a look at a NATted variant:
[200]
type=friend
context=from-sip
host=dynamic
secret=200
canreinvite=no
nat=yes
t38pt_udptl = yes
[201]
type=friend
context=from-sip
host=dynamic
secret=201
canreinvite=yes
t38pt_udptl = yes
/etc/asterisk/extensions.conf:
[from-sip]
exten => 200,1,Dial(SIP/${EXTEN}|300)
exten => 201,1,Dial(SIP/${EXTEN}|300)
Now dial 201 from 200.
Depending on your fax device (such as the Linksys 3102) you may have to edit the udptl.conf file. The error correction type that is sent is usually the culprit of many problems with ATAs and T.38 providers.
Also, try using:
t38_udptl=yes
t38pt_rtp=no
t38pt_tcp=no
... in the general section of the sip.conf and under the VoIP provider account as well as the fax account.
Also, crank down the speed of the fax machine to the slowest speed possible. Some ATAs work better like this.
Step 2 basically tells asterisk that ALL of your SIP peers are T.38 capable (which is probably not true, but not really harmful either)
1) Prepare test environment (reduce the ammount of unrelated traffic on the server);
2) Make sure your logger.conf has the following line:
console => notice,warning,error,debug
3) restart Asterik.
4) Enable SIP transaction logging with the following CLI commands:
set debug 4 (latest trunk "core debug 4")
set verbose 4 (latest trunk "core verbose 4")
sip debug
5) Save complete console log to file
6) Create bugreport at http://bugs.digium.com
7) Attach saved file to the bug.
Version information
- Asterisk 1.2 has no support for T.38.
- Asterisk 1.4 supports only T.38 fax pass through; there is however a third party way using HylaFax and OPAL to send and receive fax through Asterisk 1.4. See also rejected patch 12931 that includes a T.38 gateway. Attractel offers a commercial T.38 gateway solution for Asterisk.
- In Asterisk 1.6 also origination and termination features will be added (with gateway functionality still missing)
FAQ
Q: Does Asterisk support T.38 ATAs behind NAT with canreinvite=no ?A: See below
Q: Can I terminate T.38 calls to PSTN with Asterisk T.38 passthrough(via Zaptel)?
A: yes, http://bugs.digium.com/view.php?id=12931
CallWeaver supports T.38 termination and gateway operation.
ATA COMPATIBILITY
| ATA1(CALLER) | FIRMWARE | NAT | ASTERISK VERSION | ATA2/GW(CALLED) | FIRMWARE | NAT | works? | notes |
|---|---|---|---|---|---|---|---|---|
| HT496 | 1.0.3.44 | yes | SVN TRUNK 40000 | HT496 | 1.0.3.44 | yes | yes | example |
| HT496 | 1.0.3.64 | yes | SVN-branch-1.4-r53152 | Patton SN4960 | T4 | no | yes* | sometimes bad quality(ht496 unregister after fax is sent) |
| SPA2100 | 3.3.6 | no | Branch 1.2+patches | Cisco AS5300 | IOS 12.3 | no | yes | example |
| Kapanga | 2152b | no | SVN-branch-1.4-r47911 | Kapanga | 2152b | no | yes* | *receiving kapanga crash |
| Kapanga | 2156 | yes | SVN-branch-1.4-r53152 | Patton SN4960 | T4 | no | yes | |
| Patton SN4524 | 3.20 | yes | Asterisk 1.4.1 | Patton SN4524 | 3.20 | yes | yes | |
| SPA2102 | 5.1.6 | yes | Asterisk 1.4.2 | Patton SN4960 | R4.1 | no | NO | |
| SPA2102 | 5.1.1 | yes | Asterisk 1.4.2 | Patton SN4960 | R4.1 | no | yes | |
| SPA2102 | 5.2.5 | yes | Asterisk 1.4.19 | Gafachi | * | no | yes | |
| Micronet SP5002/S | 113 | yes | Asterisk 1.4.3 | CISCO IOS | N/A | yes | yes | |
| Grandstream HT502 | 1.0.0.39 | yes | Asterisk 1.4.3 | Patton SN4960 | 4.1 | yes | yes | |
| Grandstream HT502 | 1.0.0.39 | yes | Asterisk 1.4.4 | Grandstream HT502 | 1.0.0.39 | yes | yes | |
| Grandstream GXW4004 | 1.0.0.39 | yes | Asterisk 1.4.4 | Grandstream HT502 | 1.0.0.39 | yes | yes | |
| Gafachi UAS | 110.05 | yes | Asterisk 1.4.6+ | Grandstream HT287 (aka HT286 v3.0) | 1.1.0.3 | no | yes | |
| Grandstream HT287 (aka HT286 v3.0) | 1.1.0.3 | no | Asterisk 1.4.6+ | Gafachi UAS | 110.05 | yes | yes | |
| Grandstream HT503 | Prg.1.0.0.5 | yes | Asterisk 1.4.17 | Grandstream HT503 | Prg.1.0.0.5 | yes | yes | |
| Mediatrix 1102 | v5.0.19.124 | yes | Asterisk 1.4.18 | Mediatrix 1102 | v5.0.19.124 | yes | yes | Same behaviour for all of mediatrix products line |
Installation Procedures for Asterisk 1.4 with T.38
Installation Note: By default, Asterisk doesn't set many of the T.38 settings that may be required to interface with third party SIP trunks. You must make these changes within the chan_sip.c file before doing a make install. The T.38 configuration settings is located in chan_sip.c and can be edited with VI or your favorite text editor. The setting is modified with the line that reads as follows:/*!< This is default: NO MMR and JBIG trancoding, NO fill bit removal, transferredTCF TCF, UDP FEC, Version 0 and 9600 max fax rate */
static int global_t38_capability = T38FAX_VERSION_0 | T38FAX_RATE_2400 | T38FAX_RATE_4800 | T38FAX_RATE_7200 | T38FAX_RATE_9600;
To make changes to the T38 configuration, simply add in the changes as described in the sections above that line. For example, if you need T38FAX_VERSION_1 simply edit the file and change the 0 to 1. If you can support 12000 and 14400, simply add it to the end of the line. An example configuration with T38 verison 1 and adding 12000 and 14400 follows:
static int global_t38_capability = T38FAX_VERSION_1 | T38FAX_RATE_2400 | T38FAX_RATE_4800 | T38FAX_RATE_7200 | T38FAX_RATE_9600 | T38FAX_RATE_12000 | T38FAX_RATE_14400;
Install
cd /usr/srcsvn checkout http://svn.digium.com/svn/asterisk/branches/1.4 asterisk-1.4
(or for trunk:
svn checkout http://svn.digium.com/svn/asterisk/trunk asterisk-trunk
)
cd asterisk-1.4 (cd asterisk-trunk)
./configure;make;make install
asterisk -vvvdc
Config
/etc/asterisk/sip.conf:[general]
;NEEDED!!!
t38pt_udptl = yes
[200]
type=friend
context=from-sip
host=dynamic
secret=200
canreinvite=yes
t38pt_udptl = yes
or take a look at a NATted variant:
[200]
type=friend
context=from-sip
host=dynamic
secret=200
canreinvite=no
nat=yes
t38pt_udptl = yes
[201]
type=friend
context=from-sip
host=dynamic
secret=201
canreinvite=yes
t38pt_udptl = yes
/etc/asterisk/extensions.conf:
[from-sip]
exten => 200,1,Dial(SIP/${EXTEN}|300)
exten => 201,1,Dial(SIP/${EXTEN}|300)
Now dial 201 from 200.
Additional Troubleshooting
Depending on your fax device (such as the Linksys 3102) you may have to edit the udptl.conf file. The error correction type that is sent is usually the culprit of many problems with ATAs and T.38 providers.
Also, try using:
t38_udptl=yes
t38pt_rtp=no
t38pt_tcp=no
... in the general section of the sip.conf and under the VoIP provider account as well as the fax account.
Also, crank down the speed of the fax machine to the slowest speed possible. Some ATAs work better like this.
Installation Procedures for Asterisk T.38 Over FreePBX 2.4
- Setup /etc/asterisk/udptl.conf manually
- add "t38pt_udptl=yes" to /etc/asterisk/sip_general_custom.conf
Step 2 basically tells asterisk that ALL of your SIP peers are T.38 capable (which is probably not true, but not really harmful either)
HowTo debug & send bugreports
Please read http://www.digium.com/bugguidelines.html1) Prepare test environment (reduce the ammount of unrelated traffic on the server);
2) Make sure your logger.conf has the following line:
console => notice,warning,error,debug
3) restart Asterik.
4) Enable SIP transaction logging with the following CLI commands:
set debug 4 (latest trunk "core debug 4")
set verbose 4 (latest trunk "core verbose 4")
sip debug
5) Save complete console log to file
6) Create bugreport at http://bugs.digium.com
7) Attach saved file to the bug.
See also
- Asterisk fax
- T.38
- T38modem configuration with Asterisk
- Zoiper: SIP /IAX softphone with T.38 support incl. print2fax driver
Comments
333Gafachi T.38
Thanks!
333
333
I made some test and it looks like but I hope it's just because I made mistakes...