Hi all, I am running to the following problem, when using the below dialplan to receive fax, everything works perfect till this line exten => receive,n,ReceiveFAX(${FAXFILE}): and then the following line cannot be executed, it's like asterisk can't go back to dialplan and continue, the good news is when i check what is received in my fax folder i find that the file is a valid one (not corrupted or empty), also when I use another way to execute fax2mail, it's working perfect and sent right to my email (test was done with the same file received by ReceiveFAX), so I belive the problem is just when transiting from the line that call ReceiveFAX and the line that call fax2mail (but both work not in order or separately), the debugging of PRI channel is below dialplan (maybe i will need to turn on debugging in receiveFAX app as well), please advise!
I am using asterisk 1.6.2.11, FAX For Asterisk Components: Applications: 1.6.2.0_1.2.1 Digium FAX Driver: 1.6.2.0_1.2.1 (optimized for barcelona_64) [fax-rx] exten => receive,1,NoOp(**** FAX RECEIVE ****) exten => receive,n,Set(GLOBAL(FAXCOUNT)=$[ ${GLOBAL(FAXCOUNT)} + 1 ]) exten => receive,n,Set(FAXCOUNT=${GLOBAL(FAXCOUNT)}) exten => receive,n,Set(FAXFILE=/var/spool/asterisk/fax/${STRFTIME(,,%F_%T_${CALLERID(num)})}.tif) exten => receive,n,Set(FAXFILENOEXT=/var/spool/asterisk/fax/${STRFTIME(,,%F_%T_${CALLERID(num)})}) exten => receive,n,Set(GLOBAL(LASTFAXCALLERNUM)=${CALLERID(num)}) exten => receive,n,Set(GLOBAL(LASTFAXCALLERNAME)=${CALLERID(name)}) exten => receive,n,NoOp(**** SETTING FAXOPT ****) exten => receive,n,Set(FAXOPT(ecm)=yes) exten => receive,n,Set(FAXOPT(headerinfo)=MY FAXBACK RX) exten => receive,n,Set(FAXOPT(localstationid)=15184893772) exten => receive,n,Set(FAXOPT(maxrate)=14400) exten => receive,n,Set(FAXOPT(minrate)=2400) exten => receive,n,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)}) exten => receive,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)}) exten => receive,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)}) exten => receive,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)}) exten => receive,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)}) exten => receive,n,NoOp(**** RECEIVING FAX : ${FAXFILE} ****) exten => receive,n,ReceiveFAX(${FAXFILE}) exten => receive,n,System('/usr/local/bin/fax2mail -p -f "${FAXFILENOEXT}" --cid-number ${CALLERID(num)} --cid-name "${CALLERID(name)}" --dest-name "Sir/Madam"') *debug:* pbx3*CLI> -- Executing [receive@fax-rx:20] ReceiveFAX("DAHDI/1-1", "/var/spool/asterisk/fax/2011-06-18_12:52:44_8009806858.tif") in new stack q931.c:5088 q931_connect: Call 14288 enters state 8 (Connect Request). Hold state: Idle pbx3*CLI> pbx3*CLI> > DL-DATA request pbx3*CLI> > Protocol Discriminator: Q.931 (8) len=14 pbx3*CLI> > TEI=0 Call Ref: len= 2 (reference 14288/0x37D0) (Sent to originator) pbx3*CLI> > Message Type: CONNECT (7) TEI=0 Transmitting N(S)=1, window is open V(A)=0 K=7 pbx3*CLI> pbx3*CLI> > Protocol Discriminator: Q.931 (8) len=14 pbx3*CLI> > TEI=0 Call Ref: len= 2 (reference 14288/0x37D0) (Sent to originator) > Message Type: CONNECT (7) pbx3*CLI> > [18 03 a9 83 81] > Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Exclusive Dchan: 0 pbx3*CLI> > ChanSel: As indicated in following octets > Ext: 1 Coding: 0 Number Specified Channel Type: 3 pbx3*CLI> > Ext: 1 Channel: 1 Type: CPE] > [1e 02 81 82] pbx3*CLI> > Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Private network serving the local user (1) pbx3*CLI> > Ext: 1 Progress Description: Called equipment is non-ISDN. (2) ] pbx3*CLI> -- Channel 'DAHDI/1-1' receiving FAX '/var/spool/asterisk/fax/2011-06-18_12:52:44_8009806858.tif' pbx3*CLI> -- Channel 'DAHDI/1-1' FAX session '7' started pbx3*CLI> < Protocol Discriminator: Q.931 (8) len=5 < TEI=0 Call Ref: len= 2 (reference 14288/0x37D0) (Sent from originator) < Message Type: CONNECT ACKNOWLEDGE (15) pbx3*CLI> Received message for call 0x2aaac80812d0 on link 0x2aaac8035bb8 TEI/SAPI 0/0 q931.c:7785 post_handle_q931_message: Call 14288 enters state 10 (Active). Hold state: Idle pbx3*CLI> -- FAX handle 0: [ 104.899463 ], entering CLOSING state -- FAX handle 0: [ 104.899528 ], entering CLOSING state pbx3*CLI> < Protocol Discriminator: Q.931 (8) len=9 < TEI=0 Call Ref: len= 2 (reference 14288/0x37D0) (Sent from originator) < Message Type: DISCONNECT (69) < [08 02 82 90] pbx3*CLI> < Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Public network serving the local user (2) < Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ] Received message for call 0x2aaac80812d0 on link 0x2aaac8035bb8 TEI/SAPI 0/0 -- Processing IE 8 (cs0, Cause) pbx3*CLI> -- Found active call: 0x2aaac80812d0 cref:14288 q931.c:7994 post_handle_q931_message: Call 14288 enters state 12 (Disconnect Indication). Hold state: Idle pbx3*CLI> -- Channel 0/1, span 1 got hangup request, cause 16 pbx3*CLI> [Jun 18 12:54:30] NOTICE[11967]: res_fax.c:980 generic_fax_exec: Channel 'DAHDI/1-1' did not return a frame; probably hung up. pbx3*CLI> -- Channel 'DAHDI/1-1' FAX session '7' is complete, result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 2, resolution: '204x196', transfer rate: '12000', remoteSID: '' pbx3*CLI> == Spawn extension (fax-rx, receive, 20) exited non-zero on 'DAHDI/1-1' pbx3*CLI> q931_hangup: other hangup pbx3*CLI> NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Disconnect Indication, peerstate Disconnect Request, hold-state Idle pbx3*CLI> q931.c:5126 q931_release: Call 14288 enters state 19 (Release Request). Hold state: Idle pbx3*CLI> > DL-DATA request pbx3*CLI> > Protocol Discriminator: Q.931 (8) len=9 pbx3*CLI> > TEI=0 Call Ref: len= 2 (reference 14288/0x37D0) (Sent to originator) pbx3*CLI> > Message Type: RELEASE (77) pbx3*CLI> TEI=0 Transmitting N(S)=2, window is open V(A)=2 K=7 pbx3*CLI> pbx3*CLI> > Protocol Discriminator: Q.931 (8) len=9 > TEI=0 Call Ref: len= 2 (reference 14288/0x37D0) (Sent to originator) pbx3*CLI> > Message Type: RELEASE (77) pbx3*CLI> > [08 02 81 90] pbx3*CLI> > Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1) pbx3*CLI> > Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ] pbx3*CLI> -- Hungup 'DAHDI/1-1' pbx3*CLI> < Protocol Discriminator: Q.931 (8) len=5 < TEI=0 Call Ref: len= 2 (reference 14288/0x37D0) (Sent from originator) pbx3*CLI> < Message Type: RELEASE COMPLETE (90) pbx3*CLI> Received message for call 0x2aaac80812d0 on link 0x2aaac8035bb8 TEI/SAPI 0/0 pbx3*CLI> q931.c:7861 post_handle_q931_message: Call 14288 enters state 0 (Null). Hold state: Idle pbx3*CLI> q931_hangup: other hangup NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null, hold-state Idle pbx3*CLI> NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null, hold-state Idle -- khalid
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users