Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] error receiving a fax ... but with a fax that was received without problems


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
remmerie at gmail.com
Guest





PostPosted: Sun Sep 21, 2014 7:43 am    Post subject: [asterisk-users] error receiving a fax ... but with a fax th Reply with quote

Dear all,

When receiving a fax, the extension is "spawned", despite nothing but positive messages (see below)


The sending fax considers it a success & the verbose output of asterisk gives a "FAX_SUCCESS" and a "NO_ERROR" error in the ReceiveFax command.


The problem is that all the next steps (conversion of the fax to pdf & sending it to a mailbox) are never executed.  When I do this manually, there seems nothing wrong with the received file ....


Any hints ?


Asterisk output:



    -- Executing [502@LocalSets:5] ReceiveFAX("DAHDI/4-1", "/tmp/201409211416.tif") in new stack
    -- Channel 'DAHDI/4-1' receiving FAX '/tmp/201409211416.tif'
    -- Channel 'DAHDI/4-1' FAX session '0' started
    -- FAX handle 0: [ 037.139057 ], entering CLOSING state
    -- FAX handle 0: [ 037.139097 ], entering CLOSING state
    -- Channel 'DAHDI/4-1' FAX session '0' is complete, result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 1, resolution: '204x196', transfer rate: '14400', remoteSID: '059323634'
  == Spawn extension (LocalSets, 502, 5) exited non-zero on 'DAHDI/4-1'




Extensions-snippet
exten => 502,1,Verbose(3,Incoming Fax)
        same => n,Set(FAXDEST=/tmp)
        same => n,Set(tempfax=${STRFTIME(,,%C%y%m%d%H%M)})
        same => n,Verbose(3,- destination: ${FAXDEST}/${tempfax}.tif)
        same => n,ReceiveFax(${FAXDEST}/${tempfax}.tif)
        same => n,Verbose(3,- Fax receipt completed with status: ${FAXSTATUS})
        same => n,Verbose(3,converting fax)
        same => n,System(/usr/bin/tiff2pdf ${FAXDEST}/${tempfax}.tif -o ${FAXDEST}/${tempfax}.pdf)
        same => n,Verbose(3,fax converted ... sending fax)
        same => n,System(echo "[TC] new fax" | mutt -s "TC:fax from ${CALLERID}" myname@mymail.com (myname@mymail.com) -F /root/.muttrc -a ${FAXDEST}/${tempfax}.pdf)
        same => n,Hangup()
Back to top
jcolp at digium.com
Guest





PostPosted: Sun Sep 21, 2014 7:46 am    Post subject: [asterisk-users] error receiving a fax ... but with a fax th Reply with quote

Bart Remmerie wrote:
Quote:
Dear all,

Kia ora,

Quote:
When receiving a fax, the extension is "spawned", despite nothing but
positive messages (see below)

The sending fax considers it a success & the verbose output of asterisk
gives a "FAX_SUCCESS" and a "NO_ERROR" error in the ReceiveFax command.

The problem is that all the next steps (conversion of the fax to pdf &
sending it to a mailbox) are never executed. When I do this manually,
there seems nothing wrong with the received file ....

Any hints ?

After the fax is completed the call is hung up so subsequent dialplan
logic does not execute. You need to place the rest in the 'h' extension
which is executed upon hangup.

Cheers,

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- 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
Back to top
remmerie at gmail.com
Guest





PostPosted: Sun Sep 21, 2014 8:12 am    Post subject: [asterisk-users] error receiving a fax ... but with a fax th Reply with quote

Dear Joshua,

I don't think this is it: 
first, this has been working in the past
second, why would I get a message like the one below "exited non-zero" if everything is normal.


In the past, all following lines were executed just fine (converting the tif to a pdf and sending it a gmail mailbox)
I'm not convinced that everything is dropped after the ReceiveFax line, especially since the "Spawn extension" message applies to the ReceiveFax line itself (as if something goes wrong there) => any hints on where/how I can get a more detailed logging of this ?



 == Spawn extension (LocalSets, 502, 5) exited non-zero on 'DAHDI/4-1'


On Sun, Sep 21, 2014 at 2:45 PM, Joshua Colp <jcolp@digium.com (jcolp@digium.com)> wrote:
Quote:
Bart Remmerie wrote:
Quote:
Dear all,

Kia ora,

Quote:
When receiving a fax, the extension is "spawned", despite nothing but
positive messages (see below)

The sending fax considers it a success & the verbose output of asterisk
gives a "FAX_SUCCESS" and a "NO_ERROR" error in the ReceiveFax command.

The problem is that all the next steps (conversion of the fax to pdf &
sending it to a mailbox) are never executed.  When I do this manually,
there seems nothing wrong with the received file ....

Any hints ?

After the fax is completed the call is hung up so subsequent dialplan logic does not execute. You need to place the rest in the 'h' extension which is executed upon hangup.

Cheers,

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- 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




--
Bart Remmerie
+32 (0477) 78.88.76
remmerie@gmail.com (remmerie@gmail.com)
Back to top
jcolp at digium.com
Guest





PostPosted: Sun Sep 21, 2014 8:17 am    Post subject: [asterisk-users] error receiving a fax ... but with a fax th Reply with quote

Bart Remmerie wrote:
Quote:
Dear Joshua,

I don't think this is it:
first, this has been working in the past

If the either side didn't hang up (or it took awhile for the hangup to
be recognized) then the dialplan would continue.

Quote:
second, why would I get a message like the one below "exited non-zero"
if everything is normal.

Because the message is there to inform you of what happened. It's not
indicative of a problem in all cases.

Quote:

In the past, all following lines were executed just fine (converting the
tif to a pdf and sending it a gmail mailbox)
I'm not convinced that everything is dropped after the ReceiveFax line,
especially since the "Spawn extension" message applies to the ReceiveFax
line itself (as if something goes wrong there) => any hints on where/how
I can get a more detailed logging of this ?

* == *Spawn extension (LocalSets, 502, 5) exited non-zero on 'DAHDI/4-1'

This means that whatever was executing either encountered an error or
the channel was hung up, which is when dialplan execution stops. This is
normal as I previously mentioned.

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- 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
Back to top
lmoore at omninet.net.au
Guest





PostPosted: Mon Sep 22, 2014 3:44 am    Post subject: [asterisk-users] error receiving a fax ... but with a fax th Reply with quote

On 21/09/2014 9:11 PM, Bart Remmerie wrote:
Quote:
Dear Joshua,

I don't think this is it:
first, this has been working in the past
second, why would I get a message like the one below "exited non-zero"
if everything is normal.


Joshua is correct, to reliably process the received fax you will need to
process it in the 'h' extension.

You may want to refer to this thread
http://lists.digium.com/pipermail/asterisk-users/2013-June/279625.html,
note the afax2email script will e-mail the received tiff fax image if
the PDF conversion fails.


Larry.

--
_____________________________________________________________________
-- 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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services