[asterisk-users] Problems receiving some faxes in T.38

Santiago Gimeno santiago.gimeno at gmail.com
Wed May 20 05:58:57 CDT 2009


Hello,

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.

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.

The SIP call flows are different between the faxes we receive correctly and
the ones that fail.

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.

CISCO        Asterisk
         |              |
         |              |
         |              |
         |INVITE (SDP alaw)
         |------------->|
         |200 OK (SDP alaw)
         |<-------------|
         |ACK           |
         |------------->|
         |Re-INVITE (SDP T.38)
         |------------->|
         |200 OK (SDP T.38)
         |<-------------|
         |ACK           |
         |------------->|
         |              |
         |..............|
         |T.38          |
         |..............|
         |[t.38]no signal
         |<-------------|
         |[t.38]no signal
         |------------->|
         |[t.38]CED     |
         |<-------------|
         |[t.38]V21-preamble
         |------------->|
         |              |
         |              |

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:
"Disconnected after permitted retries".
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't answer.


CISCO        Asterisk
          |              |
          |              |
          |              |
          |INVITE (SDP alaw)
          |------------->|
          |200 OK (SDP alaw)
          |<-------------|
          |ACK           |
          |------------->|
          |Re-INVITE (SDP T.38)
          |<-------------|
          |200 OK (SDP T.38)
          |------------->|
          |ACK           |
          |<-------------|
          |              |
          |..............|
          |T.38          |
          |..............|
          |[t.38]no signal
          |<-------------|
          |[t.38]no signal
          |------------->|
          |[t.38]CED     |
          |<-------------|
          |[t.38]no signal
          |------------->|
          |[t.38]V21-preamble
          |<-------------|
          |[t.38]hdlc    |
          |<-------------|
          |[t.38]no signal
          |<-------------|
          |[t.38]V21-preamble
          |<-------------|
          |[t.38]hdlc    |
          |<-------------|
          |[t.38]no signal
          |<-------------|
          |[t.38]V21-preamble
          |<-------------|
          |[t.38]hdlc    |
          |<-------------|
          |[t.38]no signal
          |<-------------|
          |[t.38]V21-preamble
          |<-------------|
          |[t.38]hdlc    |
          |<-------------|
          |[t.38]no signal
          |<-------------|
          |[t.38]V21-preamble
          |<-------------|
          |[t.38]DCN     |
          |<-------------|
          |BYE           |
          |<-------------|
          |200 OK        |
          |------------->|


Any idea of what might be happening?

Thanks in advance. Best regards,

Santiago Gimeno




The relevant information in the asterisk configuration files is:

extensions.conf

[fax-in]
exten => 99999,1,Set(INCOMING_FAXFILE=/root/santi/fax/incoming.tif)
exten => 99999,n,Answer()
exten => 99999,n,Wait(3)
exten => 99999,n,ReceiveFax(${INCOMING_FAXFILE})

sip.conf

[general]
canreinvite=no
t38pt_udptl=yes
disallow=all
allow=alaw

context=fax-in


The CISCO peer configuration:

dial-peer voice 6 voip
destination-pattern 88T
session protocol sipv2
session target ipv4:10.100.0.51
session transport udp
dtmf-relay rtp-nte
codec g711alaw
fax-relay ecm disable
fax nsf 000000
fax protocol t38 ls-redundancy 5 hs-redundancy 2 fallback none
no vad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090520/af07d09e/attachment-0001.htm 


More information about the asterisk-users mailing list