Call answers, FAX tone, then nothing?

Squishy

New Member
Joined
Jan 27, 2009
Messages
25
Reaction score
0
exten => 456,1,Answer
exten => 456,n,Wait(1)
exten => 456,n,Set(DIALED_NUMBER=${MACRO_EXTEN})
exten => 456,n,Set(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif))
exten => 456,n,Set([email protected]
exten => 456,n,rxfax(${FAXFILE})
exten => 456,n,System(/usr/local/sbin/mailfax ${FAXFILE} ${EMAILADDR} "${CALLERIDNUM} ${CALLERIDNAME}

Does anyone have an idea what is going on or
the best way to debug this?


Yes, I've looked at:

http://nerdvittles.com/index.php?p=237

http://bestof.nerdvittles.com/applications/fax/

http://pbxinaflash.com/community/threads/hylafax.3093/?t=3093

http://pbxinaflash.com/community/threads/fax-monitor.2769/?t=2769

http://www.google.com/search?q=(fax+OR+faxing)+site:pbxinaflash.com/forum/
 
Last edited by a moderator:
You might want to post the output that comes along with:

asterisk -vvvvvvvvvvvvvvvvvvvvr

from the command line. I am having fax issues as well. You can often find some of the problems with a direct asterisk output.
 
Yeppers, Mr. Flibster.

I know that Asterisk doesn't like the line just before
it hangs up. However, I don't see any error message.

Is there a log file somewhere with the exact error
message?


-- Executing [3104560001@from-trunk:1] Set("SIP/202.101.202.101-09b084b0", "__FROM_DID=3104560001") in new stack
-- Executing [3104560001@from-trunk:2] ExecIf("SIP/202.101.202.101-09b084b0", "1 |Set|CALLERID(name)=2174925089") in new stack
-- Executing [3104560001@from-trunk:3] Set("SIP/202.101.202.101-09b084b0", "FAX_RX=disabled") in new stack
-- Executing [3104560001@from-trunk:4] Set("SIP/202.101.202.101-09b084b0", "[email protected]") in new stack
-- Executing [3104560001@from-trunk:5] Set("SIP/202.101.202.101-09b084b0", "__CALLINGPRES_SV=allowed_not_screened") in new stack
-- Executing [3104560001@from-trunk:6] SetCallerPres("SIP/202.101.202.101-09b084b0", "allowed_not_screened") in new stack
-- Executing [3104560001@from-trunk:7] Goto("SIP/202.101.202.101-09b084b0", "ext-miscdests|2|1") in new stack
-- Goto (ext-miscdests,2,1)
-- Executing [2@ext-miscdests:1] NoOp("SIP/202.101.202.101-09b084b0", "MiscDest: FAX-IN") in new stack
-- Executing [2@ext-miscdests:2] Goto("SIP/202.101.202.101-09b084b0", "from-internal|456|1") in new stack
-- Goto (from-internal,456,1)
-- Executing [456@from-internal:1] Answer("SIP/202.101.202.101-09b084b0", "") in new stack
-- Executing [456@from-internal:2] Wait("SIP/202.101.202.101-09b084b0", "1") in new stack
-- Executing [456@from-internal:3] Set("SIP/202.101.202.101-09b084b0", "DIALED_NUMBER=") in new stack
-- Executing [456@from-internal:4] Set("SIP/202.101.202.101-09b084b0", "FAXFILE=/var/spool/asterisk/fax/1235878514.16.tif)") in new stack
-- Executing [456@from-internal:5] Set("SIP/202.101.202.101-09b084b0", "[email protected]") in new stack
-- Executing [456@from-internal:6] RxFAX("SIP/202.101.202.101-09b084b0", "/var/spool/asterisk/fax/1235878514.16.tif)") in new stack
-- Executing [h@from-internal:1] Macro("SIP/202.101.202.101-09b084b0", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] ResetCDR("SIP/202.101.202.101-09b084b0", "w") in new stack
-- Executing [s@macro-hangupcall:2] NoCDR("SIP/202.101.202.101-09b084b0", "") in new stack
-- Executing [s@macro-hangupcall:3] GotoIf("SIP/202.101.202.101-09b084b0", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,6)
-- Executing [s@macro-hangupcall:6] GotoIf("SIP/202.101.202.101-09b084b0", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] GotoIf("SIP/202.101.202.101-09b084b0", "1?theend") in new stack
-- Goto (macro-hangupcall,s,11)
-- Executing [s@macro-hangupcall:11] Hangup("SIP/202.101.202.101-09b084b0", "") in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/202.101.202.101-09b084b0' in macro 'hangupcall'
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/202.101.202.101-09b084b0'
 
Yes, there is a log file.

Code:
tail -f --lines=500 /var/log/asterisk/full
..will give you the last 500 lines and (incoming) log entries as calls are processed on the system, in real-time. CTRL+C to exit...
 
Ah, yes. That's helpful.

I've changed my code to:

exten => 456,1,Answer
exten => 456,n,Wait(1)
exten => 456,n,Set(DIALED_NUMBER=${MACRO_EXTEN})
exten => 456,n,Set(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif)
exten => 456,n,Set([email protected])
exten => 456,n,rxfax(${FAXFILE})
exten => 456,n,system(/var/lib/asterisk/bin/fax-process.pl --to ${EMAILADDR} --from ${FAX_RX_FROM} --subject "Fax from ${URIENCODE(${CALLERID(number)})} ${URIENCODE(${CALLERID(name)})}" --attachment fax_${URIENCODE(${CALLERID(number)})}.pdf --type application/pdf --file ${FAXFILE};

and this way the fax is saved to a file.

However, it doesn't seem to be able to be processed
and mailed. To see where it breaks, I manually enter
the following on the command line:


/var/lib/asterisk/bin/fax-process.pl --to [email protected] --from [email protected] --subject "Fax from Some Number, Some Name" --attachment fax_SomeCallerID.pdf --type application/pdf --file 1234564734.3.tif


Unfortunately, I get an error and a warning:

sh: convert: command not found
Use of uninitialized value in concatenation (.) or string at /var/lib/asterisk/bin/fax-process.pl line 175.

Can't find anything called "convert" on the box.

I guess the error is not critical.

Does anyone see how the situation can be helped?
 
exten => 456,1,Answer
exten => 456,n,Wait(1)
exten => 456,n,Set(DIALED_NUMBER=${MACRO_EXTEN})
exten => 456,n,Set(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif))
exten => 456,n,Set([email protected]
exten => 456,n,rxfax(${FAXFILE})
exten => 456,n,System(/usr/local/sbin/mailfax ${FAXFILE} ${EMAILADDR} "${CALLERIDNUM} ${CALLERIDNAME}

You need an ending parenthesis on these lines. There's also other code missing on the last line, e.g. mismatched quotes. Where did this code come from???
 
OK. I've got it to answer the call, send fax tones
and dump the transmission into a .tif file. But
that is where it dies. (I know this because I put
in a bunch of NoOp statements).

How can I diagnose why it dies at the rxfax step?

exten => 456,n,rxfax(${FAXFILE})

On the CLI, I did: "core set debug 100". Nothing
interesting. shows up.

/var/log/asterisk/full shows a successful save of
the file, then this:

[2009-03-06 00:11:55] DEBUG[7500] /root/fax/agx-ast-addons/app_rxfax.c: Got hangup

Then an insertion into the CDR database.

Why is it dying before sending out the email?

I can process, and email out the PDFs from the Linux
command line, so that is not the problem.
 

Members online

No members online now.

Forum statistics

Threads
26,687
Messages
174,411
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top