[Asterisk-Users] chan_capi patch : fax support

Carl Sempla cas at accld.com
Thu Nov 4 09:31:19 MST 2004


Hello,

For those of you who have a CAPI card with an on-board DSP (like some Eicon
Diva Server), this patch allows you to receive faxes.
If you want to answer a channel in fax mode, use capiAnswerFax() instead of
Answer()
If you use Answer(), you will be in voice mode. If the hardware DSP detects
a fax tone, you can switch from voice to fax mode by calling
capiAnswerFax().

Example of use :
line number 123, play something, if a fax tone is detected, handle it
line number 124, answer directly in fax mode

[incoming]
exten => 123,1,Answer()
exten => 123,2,BackGround(jpop)
exten => 124,1,Goto(handle_fax,s,1)
exten => fax,1,Goto(handle_fax,s,1)

[handle_fax]
exten => s,1,capiAnswerFax(/tmp/${UNIQUEID})
exten => s,2,Hangup()
exten => h,1,deadagi,fax.php // Run sfftobmp and mail it.

The output of capiAnswerFax is a SFF file. Use sfftobmp to convert it.
With a Diva Server, theses features are allowed : fax up to 33600, high
resolution. Color Fax /JPEG Compression is disabled (I can't test it).

You can download the patch at :
http://www.mlkj.net/asterisk/chan_capi-0.3.5-patch.tar.bz2

A fix for a dead lock issue is also included (Oct 22 18:06:00
WARNING[11275]: channel.c:472 ast_channel_walk_locked: Avoided initial
deadlock for 'CAPI[contr1/173720007]/7', 10 retries!)

-- 
Carl




More information about the asterisk-users mailing list