[asterisk-users] Using Asterisk 10.6 as a T38 Fax gateway

Kevin P. Fleming kpfleming at digium.com
Wed Jul 18 09:59:24 CDT 2012


On 07/18/2012 06:30 AM, Alejandro Recarey wrote:
> Hi all, and thanks for taking the time to read this.
>
> I am trying to configure Asterisk 10.6 as a T38 Fax gateway. I am
> receiving calls through the PSTN and want to send them to my VoIP
> carriers as T38. This is my dialplan:
>
> [fax]
> exten => _X.,1,Set(FAXOPT(t38gateway)=yes,20)
> exten => _X.,n,Dial(SIP/${EXTEN}@x.x.x.x)
>
> I have tried with both FAXOPT(t38gateway) and FAXOPT(gateway). I have
> also tried setting t38pt_udptl = yes,redundancy in sip.conf. None of
> these things work. When we send a fax:

You say they don't work, but you don't provide any details (console 
output, log messages, etc.) The configuration you have provided above is 
*required* for T.38 support and T.38 gateway mode. If it's not working, 
we are going to need more details about what is actually happening (if 
anything is at all).

> 1. Asterisk does NOT send a REINVITE with the t38 offered. Reading the
> documentation, it should detect the fax tone with the audiohook and
> then send a REINVITE with t38 capability.

This is expected behavior. Proper implementations of T.38 require that 
the gateway in front of the *called* endpoint monitor for FAX tones and 
initiate the switch to T.38 mode. In your configuration, that would be 
your carrier's gateway, assuming it is terminating the call to a 
non-T.38 endpoint. If your carrier is handing off the call to another 
SIP provider, then the responsibility lies with them, and so on.

However, Asterisk's T.38 gateway functionality should still detect the 
V.21 preamble generated by the called FAX endpoint and initiate a switch 
to T.38, if the carrier does not do it first. If this is not happening, 
we'll need to see logs and console output to figure out why. What codec 
are you using for your SIP calls?

> 2. Asterisk does not offer t38 in the SDP of the initial INVITE. This
> is not a problem if it correctly detects and REINVITES for faxes, but
> our destination carriers tell us that they cannot do the REINVITE
> themselves because we do not offer t38 in our SDP, so they believe we
> do not have that capability.

This is bizarre; there is no specification anywhere that would indicate 
that a carrier should do this, and there are plenty of documents 
describing how it is a *bad* idea to offer a second media stream for 
T.38 in the initial INVITE of a call. I would urge you to ask them to 
reconsider this behavior.

> Obviously I would prefer to just detect the fax myself and have
> asterisk do the REINVITE.

This is not as reliable as the far-end gateway doing it, especially if 
the codec in use for the VoIP leg(s) of the call distorts the V.21 
preamble in any significant way.

> I have read all of the documentation on the asterisk wiki (which is
> rather short) and anything else I could find online. Unfortunately
> most of it is out of date and refers to asterisk versions 1.4 to 1.8,
> which do not have T38 Gateway capability.

The documentation on the wiki is short, but it's complete. Enabling T.38 
gateway functionality in Asterisk 10 is in fact pretty simple :-) 
Problems arise, as they always do in T.38-land, because no two T.38 
implementations are the same, and the choices made by carriers, 
gateway/softswitch/SBC manufacturers, and others, result in 
interoperability problems.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list