What kind of Gateway? H323 or MGCP?
You have to set the dial peer to relay DTMF, and add something like dtmf-relay rtp-nte (depending on which SIP provider you have)
For example here is one of my SIP dial-peers
dial-peer voice 100 voip
translation-profile incoming DID_Incoming
translation-profile outgoing no-nine
preference 1
service session
destination-pattern .T
rtp payload-type cisco-codec-fax-ack 114
rtp payload-type cisco-codec-fax-ind 113
rtp payload-type nte 98
voice-class sip dtmf-relay force rtp-nte
session protocol sipv2
session target sip-server
incoming called-number .
dtmf-relay rtp-nte
codec g711ulaw
fax rate disable
fax protocol pass-through g711ulaw
ip qos dscp cs5 media
ip qos dscp cs3 signaling
no vad
!