Receiving Faxes With Spandsp Question

Home » Asterisk Users » Receiving Faxes With Spandsp Question
Asterisk Users 2 Comments

Hello!

I’m trying to add fax functionality to my asterisk installation. Right now I’m focusing on receiving faxes. This is not explained in a book, but I assume that I can use same context, add “fax” extension and if someone calls to send fax – it will autodetect. Right?

Per book, I made following setup additions:

1. In sip.conf [general] I added:

;FAX stuff faxdetect=yes t38pt_udptl=yes

2. In extensions.conf I hade something like this:

[from-callcentric]
exten => s,1,Goto(automated_attendant,s,1)

; FAX handling stuff AS IN BOOK
exten => fax,1,Verbose(3,Incoming Fax)
same => n,Set(FAXDEST=/tmp) ; folder where faxes will be stored
same => n,Set(tempfax=${STRFTIME(,,%C%y%m%d%H%M)})
same => n,ReceiveFax(${FAXDEST}/${tempfax}.tif)
same => n,Verbose(3, – Fax receipt completed with status: ${FAXSTATUS})

Well, that didn’t work. Trying to send fax – it was going to my autoattendant and never triggered fax. So, I made a change like so:

3. Changed extensions.conf

[from-callcentric]
; FAX handling stuff AS IN BOOK
exten => s,1,Verbose(3,Incoming Fax)
same => n,Set(FAXDEST=/tmp) ; folder where faxes will be stored
same => n,Set(tempfax=${STRFTIME(,,%C%y%m%d%H%M)})
same => n,ReceiveFax(${FAXDEST}/${tempfax}.tif)
same => n,Verbose(3, – Fax receipt completed with status: ${FAXSTATUS})

I just made it fax handling context, and I got FAX 🙂 !!!! But, while fax was received I was getting following:

[2015-06-24 23:40:28] WARNING[47369][C-00000005]: res_fax_spandsp.c:438 spandsp_log: WARNING T.30 ECM carrier not found

QUESTIONS:

1. Should I do something about this warning?
2. How do I receive fax and have main entry to auto attendant in a same context? Can I have it on same puplic phone number?

Thanks!
Ivan

2 thoughts on - Receiving Faxes With Spandsp Question

  • 1. I see the same warning messages and I ignore them.

    2. I have “exten => fax,1,Goto(fax,s,1)” in both my [incoming] context and in my [screen-callers] context (equivalent to your auto-attendant, I guess). I think the time for fax detection can vary, so it might occur in either context. Then I define all the actual fax handling in the [fax] context.

  • PiBJ4oCZbSB0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