Fax in problem again

Hi, my server is consisting of asterisk 1.2.3 plus freepbx 2.1.3, TDM400p with 1 PSTN line, 1 fax machine connected to the channel 2 FXS port.

general settings: choose system, fax-to email as my email, fax-from email as another gmail email.

Inbound routing, set fax extention to Freepbx default, fax email is same as fax-to email.
fax detection type is zaptel. pause after answer is 6.

and set the destination as misc destinations i defined.

also set in zapata.conf, rxgain=7.0, faxdetect=both

and add ‘include => ext-fax’ under [from-zaptel]

also download the mime-construct from trixbox 1.2.3 in /usr/local/bin.

and upon fax in the CLI shows as below:

Starting simple switch on ‘Zap/3-1’
– Executing NoOp(“Zap/3-1”, “Entering from-zaptel with DID == “) in new stack
– Executing Set(“Zap/3-1”, “DID=s”) in new stack
– Executing NoOp(“Zap/3-1”, “DID is now s”) in new stack
– Executing GotoIf(“Zap/3-1”, “1?zapok:notzap”) in new stack
– Goto (from-zaptel,s,7)
– Executing NoOp(“Zap/3-1”, “Is a Zaptel Channel”) in new stack
– Executing Set(“Zap/3-1”, “CHAN=3-1”) in new stack
– Executing Set(“Zap/3-1”, “CHAN=3”) in new stack
– Executing Macro(“Zap/3-1”, “from-zaptel-3|s|1”) in new stack
– Executing NoOp(“Zap/3-1”, “Entering macro-from-zaptel-3 with DID = s”) in new stack
– Executing Set(“Zap/3-1”, “FROM_DID=s”) in new stack
– Executing Set(“Zap/3-1”, "[email protected]”) in new stack
– Executing Answer(“Zap/3-1”, “”) in new stack
– Executing Wait(“Zap/3-1”, “6”) in new stack
– Redirecting Zap/3-1 to fax extension
== Spawn extension (from-zaptel, fax, 0) exited non-zero on ‘Zap/3-1’ in macro ‘from-zaptel-3’
== Spawn extension (from-zaptel, fax, 0) exited non-zero on ‘Zap/3-1’
– Executing Goto(“Zap/3-1”, “ext-fax|in_fax|1”) in new stack
– Goto (ext-fax,in_fax,1)
– Executing StopPlayTones(“Zap/3-1”, “”) in new stack
– Executing GotoIf(“Zap/3-1”, “1?3:analog_fax|1”) in new stack
– Goto (ext-fax,in_fax,3)
– Executing Macro(“Zap/3-1”, “faxreceive”) in new stack
– Executing Set(“Zap/3-1”, “FAXFILE=/var/spool/asterisk/fax/1166592584.3.tif”) in new stack
– Executing Set(“Zap/3-1”, "[email protected]”) in new stack
== Spawn extension (macro-faxreceive, s, 3) exited non-zero on ‘Zap/3-1’ in macro ‘faxreceive’
== Spawn extension (macro-faxreceive, s, 3) exited non-zero on ‘Zap/3-1’
– Hungup ‘Zap/3-1’
.

Finally there is no fax in…

I have spent nearly 2 weeks and read out almost everything but still cannot get it on.
The only way I can get it working is set the destination of PSTN line to the analog extension I created for FXS port 2 directly. and also no fax email received although sendmail for voicemail works well.

Any one can help me I will appreciate it very much as I really don’t know how to solve it after trying my best.