Our setup is as follows
Fax <---->ATA <---------->Asterisk<--------->SIP GWY<—T1/PRI—>PSTN<—>Fax
canreinvite=yes, allow=g729,ulaw in Asterisk, for both ATA and SIP GWY in Asterisk’s sip.conf and there is no NAT involved. SIP GWY has g729 and g711ulaw codecs enabled.
Voice call is working fine using g729. The RTP for voice call between ATA and PSTN go directly between ATA and SIP GWY. Asterisk is there doing SIP signalling.
g729 is configured as prefered codec in the ATA and the ATA has the capability of switching to g711ualw when fax CNG or CED is detected. Idea is to use g729 for voice call and send fax in g711ulaw passthru mode.
During a fax call what we have noticed is that when the ATA sends a reinvite with g711ulaw as its codec to Asterisk. Asterisk does not forward this reinvite to SIP GWY and so the RTP from SIP GWY to ATA never change to g711ulaw and fax fails.
How can we overcome this situation.
in the attached image .28 is ATA, .20 is Asterisk and .11 is SIP GWY. In the flow chart, packet at 33.992 is the reinvite packet with media attribute ulaw from ATA