I am trying to receive a Fax through analog PSTN via X100P.
Using * 1.4.21.2 @spandsp 0.0.4pre16 @agx-ast-addons 1.4.17.5
I am able to detect/differ between a normal call and fax via nvfaxdetect.
-> My Fax machine (on a different line - no *) just keeps on sending until it gets dropped with an error.
-> My asterisk does not seem to get an end, but via ztmonitor I can see that signal is being received.
-> a 8byte tiff is saved in spool (most probably some default error, I can not open it as an image)
-- Starting simple switch on 'Zap/1-1'
-- Executing [s@DID_trunk_1:1] ExecIf("Zap/1-1", "0|SetCallerPres|unavailable") in new stack
-- Executing [s@DID_trunk_1:2] ExecIf("Zap/1-1", "0|Set|CALLERID(all)=unknown <0000000>") in new stack
-- Executing [s@DID_trunk_1:3] Goto("Zap/1-1", "default|6000|1") in new stack
-- Goto (default,6000,1)
-- Executing [6000@default:1] Macro("Zap/1-1", "stdexten|6000|SIP/6000&IAX2/6000") in new stack
-- Executing [s@macro-stdexten:1] Set("Zap/1-1", "__DYNAMIC_FEATURES=") in new stack
[Nov 17 11:19:52] WARNING[4234]: ast_expr2.fl:407 ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:
= 1
^
[Nov 17 11:19:52] WARNING[4234]: ast_expr2.fl:411 ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
-- Executing [s@macro-stdexten:2] GotoIf("Zap/1-1", "?5:3") in new stack
-- Goto (macro-stdexten,s,3)
-- Executing [s@macro-stdexten:3] Dial("Zap/1-1", "SIP/6000&IAX2/6000|20|") in new stack
[Nov 17 11:19:52] WARNING[4234]: app_dial.c:1183 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination)
[Nov 17 11:19:52] WARNING[4234]: app_dial.c:1183 dial_exec_full: Unable to create channel of type 'IAX2' (cause 3 - No route to destination)
== Everyone is busy/congested at this time (2:0/0/2)
-- Executing [s@macro-stdexten:4] Answer("Zap/1-1", "") in new stack
-- Executing [s@macro-stdexten:5] PlayTones("Zap/1-1", "ring") in new stack
-- Executing [s@macro-stdexten:6] NVFaxDetect("Zap/1-1", "4|dt") in new stack
[Nov 17 11:19:55] NOTICE[4234]: /root/src/agx-ast-addons/app_nv_faxdetect.c:219 nv_detectfax_exec: Redirecting Zap/1-1 to fax extension
-- Executing [fax@macro-stdexten:1] StopPlayTones("Zap/1-1", "") in new stack
-- Executing [fax@macro-stdexten:2] Set("Zap/1-1", "FAXFILE=/var/spool/asterisk/fax/1226917191.0.tif") in new stack
-- Executing [fax@macro-stdexten:3] Goto("Zap/1-1", "fax|s|1") in new stack
-- Goto (fax,s,1)
== Channel 'Zap/1-1' jumping out of macro 'stdexten'
-- Executing [s@fax:1] Wait("Zap/1-1", "3") in new stack
-- Executing [s@fax:2] RxFAX("Zap/1-1", "/var/spool/asterisk/fax/1226917191.0.tif") in new stack
[Nov 17 11:20:14] WARNING[4234]: /root/src/agx-ast-addons/app_rxfax.c:453 rxfax_exec: Channel T30 DONE < 0.
-- Executing [s@fax:3] Hangup("Zap/1-1", "") in new stack
== Spawn extension (fax, s, 3) exited non-zero on 'Zap/1-1'
-- Executing [h@fax:1] System("Zap/1-1", "/usr/local/sbin/mailfax /var/spool/asterisk/fax/1226917191.0.tif "0285515744"") in new stack
-- Hungup 'Zap/1-1'
my extensions (only selected)
[code]
[macro-stdexten]
exten = s,1,Set(_DYNAMIC_FEATURES=${FEATURES})
exten = s,2,GotoIf($[${FOLLOWME${ARG1}} = 1]?5:3)
exten = s,3,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
exten = s,4,Answer
exten = s,5,Playtones(ring) ; play fake ring so caller doesn’t wonder whats goi$
exten = s,6,NVFaxDetect(4|dt) ; while playing ring sound, detect faxes for 4 se$
exten = s,7,Goto(s-${DIALSTATUS},1)
exten = s,8,Macro(stdexten-followme,${ARG1},${ARG2})
exten = s-NOANSWER,1,Voicemail(${ARG1},u)
exten = s-NOANSWER,2,Goto(default,s,1)
exten = s-BUSY,1,Voicemail(${ARG1},b)
exten = s-BUSY,2,Goto(default,s,1)
exten = _s-.,1,Goto(s-NOANSWER,1)
exten = a,1,VoicemailMain(${ARG1})
; If this is a fax, get it
exten => fax,1,StopPlaytones ; you must do this or it will play ring sounds ove$
exten => fax,2,Set(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif)
;exten => fax,3,DBGet(EMAILADDR=extensionemail/${MACRO_EXTEN})
exten => fax,3,Goto(fax,s,1)
[fax]
exten => s,1,wait(3)
exten => s,2,rxfax(${FAXFILE})
exten => s,3,Hangup
exten => h,1,system(/usr/local/sbin/mailfax ${FAXFILE} “${CALLERID(num)}”)[/code]