Pstn -> pri -> asterisk -> pri -> pbx -> fax

Hi all,

We are trying to install an Asterisk server transparently between the PSTN and an Ericson PBX through PRI ports. All works fine, but fax machines receives a communication error and you can’t use dialup modems.

Any ideas?


I am looking at the same setup. Were you able to get this working? If not, does anyone have any ideas to get this working?


I have solved the problem by correctly configuring the timing sources of the PRIs. e.g. NT -> span=1,0,0 … and for CPE -> span=1,1,0 …

Had a similar problem with analog cards. I tried faxdetect in zapata.conf

It worked but the fax noises were cut short. Like I said it worked, but I wasn’t 100% on data through a modem.

If someone can give me some sort of explanation/pointers it’ll help me next time round.


I just want to say before I try to answer your question. This is how I understand the situation and I also need confirmation from experts in this field since I am not very knowledgeable on this subject.
Your answer lies in how TDM works. If you are using an E1 PRI card then it means that a single connection is shared by 30 channels. This is done by giving each channel a timeslot to transmit or receive. This of cause happens in milliseconds. To be able to communicate in these defined timeslots the source PRI and the destination PRI’s timers must be in sync. Therefore in a PRI connection, one side will be the time sync master and the other the slave. The slave will sync its timer with the master. The problem with a PRI and zaptel analogue configuration is that the zaptel ports are not in sync with the PRI card, meaning that the zaptel analogue port will send data even if it is not in its channel’s timeslot on the PRI card. If you are having a normal speech conversation you would not notice any difference because it happens so quickly. If you are using a fax or modem then you will loose data and it will have a major influence. In an interconnection between analogue ports and a PRI port within a PBX like an Ericson PABX the analogue ports most likely would be in sync with the PRI port’s timer. In Asterisk there is no timer sync between analogue ports and the PRI card. However Sangoma has got a solution with a PRI timer sync to analogue ports: You can also have a look at Xorcom, which also have a synchronised solution.

I got this answer from a friend, I am posting here since is relationated with this issue and I think it is very interesting (probably there would be a lot of diferent points of view on this)

Sangoma and Fax

As you all probably are aware, Sangoma recently made a press release about their new faxing abilities. Here is a good response that you can use from our Director of Software Technologies, Kevin Fleming:
While I won’t dispute that this is an improvement, stating that FAX via analog port on a PBX through a T1/E1 interface is totally unreliable/unusable is complete FUD (Fear, Uncertainty, and Doubt). There are hundreds/thousands of people doing that already and, except in very rare cases, it works just fine… they are more likely to run into FAX machine incompatibility than they are the inability to get a FAX transmitted successfully this way.

On top of that, this ‘solution’ cannot completely solve the problem, because the only thing it does is provide a clock source for the analog card. The TDM data still needs to pass from the T1/E1 card across the PCI bus, into the operating system kernel and then the drivers/applications, then back out the PCI bus and into the analog interface card. There are still huge areas where the software or the load on the system could cause FAX transmission to fail even with this shared clocking arrangement.

This is a strong response from a recognized community leader and could help combat any questions about our current ability to handle fax.