Inbound faxes over ISDN2. Simple fax receives ok but complicated / multiple page fax fails...

stevo_border
Posts: 1
Member Since:
2009-11-18

Hi All,

I am very new to these forums so please go easy on me if this has been discussed before. I have searched high and low but cannot seem to find an answer to this. Please let me know if you need more info on this.

I have trixbox 2.6.2.2 with a sangoma a400 isdn2 card. I have a ddi number which I want to use as a fax.

I have an inbound route setup as follows:

Fax estension: system
email: my email@email
detection type nvfax
pause after answer 6

If I send a simple fax (if i scribble test fax on a sheet of A4) to my ddi number this comes through to my email address within seconds in a 2KB PDF file called fax_0.pdf . this I can open and view perfectly.

If I FTP to var/spool/asterisk/fax I can see that the simple fax has created a tif file of 4,974KB which I can open perfectly.

If I send either a more complicated single page / multiple page fax (for example an invoice or multiple lines or printed text). the sending fax reports a sending error and I receive a PDF file in my email which I cannot open. This PDF file size is usually 91B.

If I FTP to var/spool/asterisk/fax I can see that the complex fax has created a tif file of 8 Bytes which I cannot open.

Any help will be very much appreciated.

Many thanks in advance.

Steve

Asterisk-r dump from a simple fax which is received and opens fine:

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
EVENT INCOMING w1g1
Unique-Call-Id: w1g1-370917955-1889804310
Remote-Number:
Remote-Name:
Protocol: BRI
User-Agent: sangoma_mgd
Local-Number: 235252
Channel-Name: g2/1
Trunk-Group: 2
Presentation: 0
Screening: 0
RDNIS:

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
EVENT HELLO Sangoma Media Gateway
Supported-Protocols: TDM
Version: v1.33
Remote-Address: 127.0.0.1
Remote-Port: 53100
Raw-Format: ALAW

**[WOOMERA]** Send Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
PROCEED w1g1-370917955-1889804310
Unique-Call-Id: w1g1-370917955-1889804310

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
200 w1g1-370917955-1889804310 PROCEED OK
Unique-Call-Id: w1g1-370917955-1889804310

**[WOOMERA]** Send Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
MEDIA w1g1-370917955-1889804310
Raw-Audio: 127.0.0.1:10375
Request-Audio: Raw
Unique-Call-Id: w1g1-370917955-1889804310

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
200 MEDIA OK
Unique-Call-Id: w1g1-370917955-1889804310

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
EVENT MEDIA w1g1 AUDIO
Unique-Call-Id: w1g1-370917955-1889804310
Raw-Audio: 127.0.0.1:9467
Call-ID: w1g1
Raw-Format: PCM-16
DTMF: InBand

**[WOOMERA]** HW DTMF not supported w1g1-370917955-1889804310
-- Executing [235252@from-zaptel:1] Set("WOOMERA/g2/1-68a2", "CALLERID(num)=0") in new stack
-- Executing [235252@from-zaptel:2] Set("WOOMERA/g2/1-68a2", "DID=235252") in new stack
-- Executing [235252@from-zaptel:3] Goto("WOOMERA/g2/1-68a2", "s|1") in new stack
-- Goto (from-zaptel,s,1)
-- Executing [s@from-zaptel:1] NoOp("WOOMERA/g2/1-68a2", "Entering from-zaptel with DID == 235252") in new stack
-- Executing [s@from-zaptel:2] Ringing("WOOMERA/g2/1-68a2", "") in new stack
-- Executing [s@from-zaptel:3] Set("WOOMERA/g2/1-68a2", "DID=235252") in new stack
-- Executing [s@from-zaptel:4] NoOp("WOOMERA/g2/1-68a2", "DID is now 235252") in new stack
-- Executing [s@from-zaptel:5] GotoIf("WOOMERA/g2/1-68a2", "0?zapok:notzap") in new stack
-- Goto (from-zaptel,s,6)
-- Executing [s@from-zaptel:6] Goto("WOOMERA/g2/1-68a2", "from-pstn|235252|1") in new stack
-- Goto (from-pstn,235252,1)
-- Executing [235252@from-pstn:1] Set("WOOMERA/g2/1-68a2", "__FROM_DID=235252") in new stack
-- Executing [235252@from-pstn:2] Gosub("WOOMERA/g2/1-68a2", "app-blacklist-check|s|1") in new stack
-- Executing [s@app-blacklist-check:1] LookupBlacklist("WOOMERA/g2/1-68a2", "") in new stack
-- Executing [s@app-blacklist-check:2] GotoIf("WOOMERA/g2/1-68a2", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:3] Return("WOOMERA/g2/1-68a2", "") in new stack
-- Executing [235252@from-pstn:3] GotoIf("WOOMERA/g2/1-68a2", "0 ?cidok") in new stack
-- Executing [235252@from-pstn:4] Set("WOOMERA/g2/1-68a2", "CALLERID(name)=0") in new stack
-- Executing [235252@from-pstn:5] NoOp("WOOMERA/g2/1-68a2", "CallerID is "0" ") in new stack
-- Executing [235252@from-pstn:6] Set("WOOMERA/g2/1-68a2", "FAX_RX=system") in new stack
-- Executing [235252@from-pstn:7] Set("WOOMERA/g2/1-68a2", "FAX_RX_EMAIL=steve@xxxxxxxxxxxx.co.uk") in new stack
-- Executing [235252@from-pstn:8] Answer("WOOMERA/g2/1-68a2", "") in new stack
**[WOOMERA]** +++ANSWER WOOMERA/g2/1-68a2
-- Executing [235252@from-pstn:9] PlayTones("WOOMERA/g2/1-68a2", "ring") in new stack
-- Executing [235252@from-pstn:10] NVFaxDetect("WOOMERA/g2/1-68a2", "7") in new stack
**[WOOMERA]** Send Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
ACCEPT w1g1-370917955-1889804310
Raw-Audio: 127.0.0.1:10375
Request-Audio: Raw
Unique-Call-Id: w1g1-370917955-1889804310

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
200 ACCEPT OK
Unique-Call-Id: w1g1-370917955-1889804310

**[WOOMERA]** Send Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
ANSWER w1g1-370917955-1889804310
Unique-Call-Id: w1g1-370917955-1889804310

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
200 ANSWER OK
Unique-Call-Id: w1g1-370917955-1889804310

-- Executing [fax@from-pstn:1] Goto("WOOMERA/g2/1-68a2", "ext-fax|in_fax|1") in new stack
-- Goto (ext-fax,in_fax,1)
-- Executing [in_fax@ext-fax:1] StopPlayTones("WOOMERA/g2/1-68a2", "") in new stack
-- Executing [in_fax@ext-fax:2] GotoIf("WOOMERA/g2/1-68a2", "1?3:analog_fax|1") in new stack
-- Goto (ext-fax,in_fax,3)
-- Executing [in_fax@ext-fax:3] Macro("WOOMERA/g2/1-68a2", "faxreceive") in new stack
-- Executing [s@macro-faxreceive:1] Set("WOOMERA/g2/1-68a2", "FAXFILE=/var/spool/asterisk/fax/1258545861.1654.tif") in new stack
-- Executing [s@macro-faxreceive:2] Set("WOOMERA/g2/1-68a2", "EMAILADDR=steve@xxxxxxxxxxxx.co.uk") in new stack
-- Executing [s@macro-faxreceive:3] RxFAX("WOOMERA/g2/1-68a2", "/var/spool/asterisk/fax/1258545861.1654.tif") in new stack
**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
EVENT HANGUP w1g1
Unique-Call-Id: w1g1-370917955-1889804310
Start-Time: 1258545894
End-Time: 1258545894
Answer-Time: 1258545894
Call-ID: w1g1
Cause: NORMAL_CLEARING
Q931-Cause-Code: 16

**[WOOMERA]** Hangup [w1g1-370917955-1889804310]
-- Executing [h@ext-fax:1] System("WOOMERA/g2/1-68a2", "/var/lib/asterisk/bin/fax-process.pl --to steve@xxxxxxxxxxxx.co.uk --from pbx@xxxxxxxxx.co.uk --subject "Fax from 0 0" --attachment fax_0.pdf --type application/pdf --file /var/spool/asterisk/fax/1258545861.1654.tif") in new stack
-- Executing [h@ext-fax:2] Hangup("WOOMERA/g2/1-68a2", "") in new stack
== Spawn extension (ext-fax, h, 2) exited non-zero on 'WOOMERA/g2/1-68a2'

-------------------------------------------
-*----------------------------------------

Asterisk-r dump from a more complex / multiple page fax from which I receive a corrupted pdf:

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
EVENT INCOMING w1g1
Unique-Call-Id: w1g1-286448566-1844400657
Remote-Number:
Remote-Name:
Protocol: BRI
User-Agent: sangoma_mgd
Local-Number: 235252
Channel-Name: g2/1
Trunk-Group: 2
Presentation: 0
Screening: 0
RDNIS:

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
EVENT HELLO Sangoma Media Gateway
Supported-Protocols: TDM
Version: v1.33
Remote-Address: 127.0.0.1
Remote-Port: 37301
Raw-Format: ALAW

**[WOOMERA]** Send Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
PROCEED w1g1-286448566-1844400657
Unique-Call-Id: w1g1-286448566-1844400657

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
200 w1g1-286448566-1844400657 PROCEED OK
Unique-Call-Id: w1g1-286448566-1844400657

**[WOOMERA]** Send Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
MEDIA w1g1-286448566-1844400657
Raw-Audio: 127.0.0.1:10393
Request-Audio: Raw
Unique-Call-Id: w1g1-286448566-1844400657

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
200 MEDIA OK
Unique-Call-Id: w1g1-286448566-1844400657

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
EVENT MEDIA w1g1 AUDIO
Unique-Call-Id: w1g1-286448566-1844400657
Raw-Audio: 127.0.0.1:9485
Call-ID: w1g1
Raw-Format: PCM-16
DTMF: InBand

**[WOOMERA]** HW DTMF not supported w1g1-286448566-1844400657
-- Executing [235252@from-zaptel:1] Set("WOOMERA/g2/1-d7fd", "CALLERID(num)=0") in new stack
-- Executing [235252@from-zaptel:2] Set("WOOMERA/g2/1-d7fd", "DID=235252") in new stack
-- Executing [235252@from-zaptel:3] Goto("WOOMERA/g2/1-d7fd", "s|1") in new stack
-- Goto (from-zaptel,s,1)
-- Executing [s@from-zaptel:1] NoOp("WOOMERA/g2/1-d7fd", "Entering from-zaptel with DID == 235252") in new stack
-- Executing [s@from-zaptel:2] Ringing("WOOMERA/g2/1-d7fd", "") in new stack
-- Executing [s@from-zaptel:3] Set("WOOMERA/g2/1-d7fd", "DID=235252") in new stack
-- Executing [s@from-zaptel:4] NoOp("WOOMERA/g2/1-d7fd", "DID is now 235252") in new stack
-- Executing [s@from-zaptel:5] GotoIf("WOOMERA/g2/1-d7fd", "0?zapok:notzap") in new stack
-- Goto (from-zaptel,s,6)
-- Executing [s@from-zaptel:6] Goto("WOOMERA/g2/1-d7fd", "from-pstn|235252|1") in new stack
-- Goto (from-pstn,235252,1)
-- Executing [235252@from-pstn:1] Set("WOOMERA/g2/1-d7fd", "__FROM_DID=235252") in new stack
-- Executing [235252@from-pstn:2] Gosub("WOOMERA/g2/1-d7fd", "app-blacklist-check|s|1") in new stack
-- Executing [s@app-blacklist-check:1] LookupBlacklist("WOOMERA/g2/1-d7fd", "") in new stack
-- Executing [s@app-blacklist-check:2] GotoIf("WOOMERA/g2/1-d7fd", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:3] Return("WOOMERA/g2/1-d7fd", "") in new stack
-- Executing [235252@from-pstn:3] GotoIf("WOOMERA/g2/1-d7fd", "0 ?cidok") in new stack
-- Executing [235252@from-pstn:4] Set("WOOMERA/g2/1-d7fd", "CALLERID(name)=0") in new stack
-- Executing [235252@from-pstn:5] NoOp("WOOMERA/g2/1-d7fd", "CallerID is "0" ") in new stack
-- Executing [235252@from-pstn:6] Set("WOOMERA/g2/1-d7fd", "FAX_RX=system") in new stack
-- Executing [235252@from-pstn:7] Set("WOOMERA/g2/1-d7fd", "FAX_RX_EMAIL=steve@xxxxxxxxxxxxxxxxxxxxxxx.co.uk") in new stack
-- Executing [235252@from-pstn:8] Answer("WOOMERA/g2/1-d7fd", "") in new stack
**[WOOMERA]** +++ANSWER WOOMERA/g2/1-d7fd
-- Executing [235252@from-pstn:9] PlayTones("WOOMERA/g2/1-d7fd", "ring") in new stack
-- Executing [235252@from-pstn:10] NVFaxDetect("WOOMERA/g2/1-d7fd", "7") in new stack
**[WOOMERA]** Send Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
ACCEPT w1g1-286448566-1844400657
Raw-Audio: 127.0.0.1:10393
Request-Audio: Raw
Unique-Call-Id: w1g1-286448566-1844400657

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
200 ACCEPT OK
Unique-Call-Id: w1g1-286448566-1844400657

**[WOOMERA]** Send Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
ANSWER w1g1-286448566-1844400657
Unique-Call-Id: w1g1-286448566-1844400657

**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
200 ANSWER OK
Unique-Call-Id: w1g1-286448566-1844400657

-- Executing [fax@from-pstn:1] Goto("WOOMERA/g2/1-d7fd", "ext-fax|in_fax|1") in new stack
-- Goto (ext-fax,in_fax,1)
-- Executing [in_fax@ext-fax:1] StopPlayTones("WOOMERA/g2/1-d7fd", "") in new stack
-- Executing [in_fax@ext-fax:2] GotoIf("WOOMERA/g2/1-d7fd", "1?3:analog_fax|1") in new stack
-- Goto (ext-fax,in_fax,3)
-- Executing [in_fax@ext-fax:3] Macro("WOOMERA/g2/1-d7fd", "faxreceive") in new stack
-- Executing [s@macro-faxreceive:1] Set("WOOMERA/g2/1-d7fd", "FAXFILE=/var/spool/asterisk/fax/1258547372.1677.tif") in new stack
-- Executing [s@macro-faxreceive:2] Set("WOOMERA/g2/1-d7fd", "EMAILADDR=steve@xxxxxxxxxxxxxxxxxxxxxxx.co.uk") in new stack
-- Executing [s@macro-faxreceive:3] RxFAX("WOOMERA/g2/1-d7fd", "/var/spool/asterisk/fax/1258547372.1677.tif") in new stack
**[WOOMERA]** Receive Message: {default} [localhost/42420]
--------------------------------------------------------------------------------
EVENT HANGUP w1g1
Unique-Call-Id: w1g1-286448566-1844400657
Start-Time: 1258547436
End-Time: 1258547436
Answer-Time: 1258547436
Call-ID: w1g1
Cause: NORMAL_CLEARING
Q931-Cause-Code: 16

**[WOOMERA]** Hangup [w1g1-286448566-1844400657]
-- Executing [h@ext-fax:1] System("WOOMERA/g2/1-d7fd", "/var/lib/asterisk/bin/fax-process.pl --to steve@xxxxxxxxxxxxxxxxxxxxxxx.co.uk --from pbx@xxxxxxxxx.co.uk --subject "Fax from 0 0" --attachment fax_0.pdf --type application/pdf --file /var/spool/asterisk/fax/1258547372.1677.tif") in new stack
-- Executing [h@ext-fax:2] Hangup("WOOMERA/g2/1-d7fd", "") in new stack
== Spawn extension (ext-fax, h, 2) exited non-zero on 'WOOMERA/g2/1-d7fd'