Asterisk supports T.38 fax passthrough, origination and termination. It does not support gateway operation. The only channel driver that supports T.38 at this time is chan_sip.
UDPTL is handled very much like RTP. It can be reinvited to go directly between the endpoints, without involving Asterisk in the media stream.