Hello,<br><div class="gmail_quote"><div class="gmail_quote"><div class="gmail_quote"><div class="gmail_quote"><div class="gmail_quote"><div><div></div><div><div><div><div class="im"><br>We have been working with the ReceiveFax application for some weeks now in order to receive faxes in T.38 and it works fairly well, but there are some faxes that for some reason we are not able to receive correctly.<br>






<br></div>The asterisk version we are using is 1.6.0.6 with spandsp-0.0.5pre4 and the asterisk machine is behind a CISCO mediaGW to be able to communicate with the PSTN.<div class="im"><br><br>The SIP call flows are different between the faxes we receive correctly and the ones that fail.<br>






<br>In the case of successfully received faxes, after establishing the audio session between de CISCO and Asterisk, CISCO sends a re-INVITE with the T.38 SDP. The T.38 setup succeeds. <br><br>CISCO        Asterisk<br>          |              |<br>






          |              |<br>          |              |<br>          |INVITE (SDP alaw)<br>          |-------------&gt;|<br>          |200 OK (SDP alaw)<br>          |&lt;-------------|<br>          |ACK           |<br>





          |-------------&gt;|<br>
          |Re-INVITE (SDP T.38)<br>          |-------------&gt;|<br>          |200 OK (SDP T.38)<br>          |&lt;-------------|<br>          |ACK           |<br>          |-------------&gt;|<br>          |              |<br>






          |..............|<br>          |T.38          |<br>          |..............|<br>          |[t.38]no signal<br>          |&lt;-------------|<br>          |[t.38]no signal<br>          |-------------&gt;|<br>          |[t.38]CED     |<br>






          |&lt;-------------|<br>          |[t.38]V21-preamble<br>          |-------------&gt;|<br>          |              |<br>          |              |<br><br></div></div></div>On the other hand, with some faxes, the re-INVITE is sent by Asterisk and it looks that there is something wrong in the T.38 setup that makes the fax reception fail after the permitted retries. The FAXERROR variable is set to: &quot;Disconnected after permitted retries&quot;.<br>


What I can see from the traces is that it gets to a point that asterisk is sending T.38 data to the CISCO but the CISCO doesn&#39;t answer.<br></div>
</div><div><div></div><div><div><div></div><div class="h5"><div><div><div></div><div>
<br>

<br>CISCO        Asterisk<br>          |              |<br>          |              |<br>          |              |<br>          |INVITE (SDP alaw)<br>          |-------------&gt;|<br>          |200 OK (SDP alaw)<br>          |&lt;-------------|<br>



          |ACK           |<br>          |-------------&gt;|<br>          |Re-INVITE (SDP T.38)<br>          |&lt;-------------|<br>          |200 OK (SDP T.38)<br>          |-------------&gt;|<br>          |ACK           |<br>



          |&lt;-------------|<br>          |              |<br>          |..............|<br>          |T.38          |<br>          |..............|<br>          |[t.38]no signal<br>          |&lt;-------------|<br>          |[t.38]no signal<br>



          |-------------&gt;|<br>          |[t.38]CED     |<br>          |&lt;-------------|<br>          |[t.38]no signal<br>          |-------------&gt;|<br>          |[t.38]V21-preamble<br>          |&lt;-------------|<br>



          |[t.38]hdlc    |<br>          |&lt;-------------|<br>          |[t.38]no signal<br>          |&lt;-------------|<br>          |[t.38]V21-preamble<br>          |&lt;-------------|<br>          |[t.38]hdlc    |<br>



          |&lt;-------------|<br>          |[t.38]no signal<br>          |&lt;-------------|<br>          |[t.38]V21-preamble<br>          |&lt;-------------|<br>          |[t.38]hdlc    |<br>          |&lt;-------------|<br>



          |[t.38]no signal<br>          |&lt;-------------|<br>          |[t.38]V21-preamble<br>          |&lt;-------------|<br>          |[t.38]hdlc    |<br>          |&lt;-------------|<br>          |[t.38]no signal<br>



          |&lt;-------------|<br>          |[t.38]V21-preamble<br>          |&lt;-------------|<br>          |[t.38]DCN     |<br>          |&lt;-------------|<br>          |BYE           |<br>          |&lt;-------------|<br>



          |200 OK        |<br>          |-------------&gt;|</div></div><br><br></div><div>Any idea of what might be happening?<br><br></div>Thanks in advance. Best regards,<br><br></div></div>Santiago Gimeno<br></div></div>

<div><div>
</div><div><div><div></div><div class="h5"><div><div></div><div>
<br><div><div></div><div><br><br><br>The relevant information in the asterisk configuration files is:<br>
<br>extensions.conf<br><br>[fax-in]<br>

exten =&gt; 99999,1,Set(INCOMING_FAXFILE=/root/santi/fax/incoming.tif)<br></div></div><div><div><div></div><div>
exten =&gt; 99999,n,Answer()<br>
exten =&gt; 99999,n,Wait(3)<br>
exten =&gt; 99999,n,ReceiveFax(${INCOMING_FAXFILE})<br><br>sip.conf<br><br>[general]<br>
canreinvite=no<br>
t38pt_udptl=yes<br>
disallow=all<br>
allow=alaw<br>
<br>
context=fax-in<br><br><br>The CISCO peer configuration:<br><br><font size="2" face="Arial"><span style="font-size: 10pt;">dial-peer voice 6 voip<br></span></font><font size="2"><span style="font-size: 10pt;" lang="EN-GB">destination-pattern 88T</span></font><br>






<font size="2" face="Arial"><span style="font-size: 10pt;" lang="EN-GB">session protocol sipv2</span></font><br><font size="2" face="Arial"><span style="font-size: 10pt;" lang="EN-GB">session target 
ipv4:10.100.0.51</span></font><br><font size="2" face="Arial"><span style="font-size: 10pt;" lang="EN-GB">session transport udp</span></font><br><font size="2" face="Arial"><span style="font-size: 10pt;" lang="EN-GB">dtmf-relay rtp-nte</span></font><br>






<font size="2" face="Arial"><span style="font-size: 10pt;" lang="EN-GB">codec g711alaw</span></font><br><font size="2" face="Arial"><span style="font-size: 10pt;" lang="EN-GB">fax-relay ecm disable</span></font><br><font size="2" face="Arial"><span style="font-size: 10pt;" lang="EN-GB">fax nsf 000000</span></font><br>






<font size="2" face="Arial"><span style="font-size: 10pt;" lang="EN-GB">fax protocol t38 ls-redundancy 5 hs-redundancy 2 
fallback none</span></font><br><font size="2"><span style="font-size: 10pt;">no vad</span></font></div></div></div></div></div></div></div></div></div></div>
</div>
</div><br>
</div><br>
</div><br>