I’ve found an old small tuto about faxing with tdm at this address
http://www.asteriskguru.com/tutorials/fax_pstn_passthru_tdm.html.
This is it:
start
First you need your TDM400P card to behave as it should. Let’s say you have your fxs device (the one where you would be plugging in your PSTN line) on channel 4 and your fxo (the one where you would be plugging in your fax line) on channel 3.
In /etc/zaptel.conf you make sure you have the following lines:
fxoks=3
fxsks=4
The first line defines you’ll be using the third device as a FXO, the second line states you’ll use the forth device as a FXS. KS stands for koolstart, this one should do the trick.
Next file in line is zapata.conf. You should find it under /etc/asterisk/zapata.conf. Don’t get scared by the huge example file.
We won’t cover the zapata specifics, but one thing to point out is the rather specific configuration for every channel. For every channel you need to define above “channel => x” the variables. To allow fax detection you need to add the variable: faxdetect=both, or faxdetect=incoming or faxdetect=outgoing, all depending on your need. It allows you zaptel channel to check if it signal would be a fax signal.
In our example we have the following configuration for our channels:
immediate=no
busydetect=yes
busycount=8
musiconhold=default
faxdetect=both
signalling=fxs_ks
context=sip
channel => 4
immediate=no
busydetect=yes
busycount=8
musiconhold=default
faxdetect=both
signalling=fxo_ks
context=fax
channel => 3
Do note the context ‘fax’, we’ll recycle that in extensions.conf, which is next.
So far, we made sure our card is recognised and can put ‘fax’-calls in a ‘fax’ context.
So we add a three liner to extensions.conf to finalise everything:
[fax]
exten => s,1,Dial(ZAP/4/${EXTEN})
Which means, we added a context fax in the extensions.conf, insuring calls being detected as fax calls to be caught and handled, by the description above. Which is, send it on to the 4th channel.
On that channel you’re supposed to connect a fax device. This can be your ordinary fax, or a faxmodem with e.g. hylafax.
End
I’ve modified this tuto but it failed. As I told you, I have a TDM800. I’ve plugged the analog fax line on port 4 and the fax machine is directly connected to port 5. This is the modifications I’ve made:
My modifications
In /etc/dahdi/system.conf:
fxoks=5
fxsks=4
In /etc/asterisk/chan_dahdi.conf
[general]
#include chan_dahdi_general.conf
immediate=no
busydetect=yes
busycount=8
musiconhold=default
faxdetect=incoming
signalling=fxs_ks
context=sip
channel => 4
immediate=no
busydetect=yes
busycount=8
musiconhold=default
faxdetect=incoming
signalling=fxo_ks
context=fax
channel => 5
In /etc/asterisk/extensions.conf (At the end of the file):
[fax]
exten => s,1,Dial(DAHDI/4/${EXTEN})
Do you think this could work? I find strange to see sip as context for the channel 4. Should I change this ?