X100P Cards As FXS Devices

Feb. 21, 2005
updated Oct 26, 2005

FXS Support
For The X100P


Standard X100P cards are normally used as FXO devices. FXS devices (devices which allow you to plug in a standard telephone set) are of course available but are more expensive than FXO cards. This hack enables you to use the X100P (and clone) cards as FXS devices, subject to certain limitations:

This hack requires you to make both software and hardware changes (see below). You must download and apply a software patch to the asterisk zaptel (wcfxo) driver. In the simplest case, the hardware changes require only wiring changes - no other additional hardware components are needed (aside from the wiring and connectors).


The software consists of a patch to the asterisk zaptel (wcfxo.c) driver. This enhanced driver enables the X100P cards to act as FXS devices, by making the following additions:

Driver Download

x100pfxs-0.1.tar.gz fbc4c8c8ce7e3d7b965e02e732ad9031    Download Version 0.1 (obsolete)
x100pfxs-0.2.tar.gz 2207737bdf6b1d89d6e4849b94cb447c    Download Version 0.2 (obsolete)
x100pfxs-0.3.tar.gz 02884b107de13f42f3236afa9352a64b    Download Version 0.3


Choose one of the example circuits below, or any equivalent circuit may be used. Basically, you must supply loop current to the card and properly route the speech currents. The minimum hardware circuit is shown in Fig. 1.

Fig. 1 - Hardware Interface (Series Circuit)

This is the simplest possible way of connecting the phone to the FXO card, and it provides a zero cost solution (excluding the connectors) if you take the 12V from the PC. There are several drawbacks of the simplified circuit - the two most prominent ones are (1) the circuit is not properly balanced for AC (may potentially cause inductive noise and/or crosstalk, although I haven't had this problem); and (2) noise and hash from the PC power supply is audible in the line (unless you add a filter). But, the price is difficult to argue with, and the tradeoffs may be acceptable in certain situations for some people.

If you use this circuit, the 12V (hot) lead of the PC's power supply should be connected to the X100P card; the ground lead from the PS should be connected to the phone. Otherwise, the 12V line would be directly exposed to the outside world and risk a possible short-circuit.

Measured loop current in this circuit was 20 mA, slightly low but acceptable (provided that no more than one phone is connected to the line). Line current may be increased if desired by increasing the PS voltage.

Fig. 2 - Hardware Interface (Relay Circuit)

RL1 and RL2 are telephone relays. The arrows represent contacts which close and open in unison with the applied current, i.e., in unison with the switchhook of the attached phone. The basic intent of the circuit is threefold... (1) to supply talk battery (aka loop current) to the phone (RL1); (2) to supply talk battery to the FXO card (RL2), as well as supervision (off hook and on hook signals, controlled by the phone via the contacts of RL1; and (3) to provide an impedance bridge to connect the two talking circuits together (C1 and C2)...


> You say: "runs in offhook mode at all times" -
> what does that mean? 

In the normal usage of an FXO card, it stays in the
onhook state until it's time to make a call, then goes
offhook for the duration of the call, then back

In the FXS adaptation, the card itself stays in the
offhook state at all times, and depends upon the
external hardware to turn the loop current off and on
to determine the hook state of the system.

> What is the effect on using the phone7fax connected
> t the X100P? No 
> dialtone?

If you were to plug in a phone directly to the card,
nothing would happen because neither the phone nor the
card supplies loop current, so the hack requires
external circuitry to be supplied (by you) to supply
the loop current. 

With the hack, it works just like a real FXS card,
including dialtone...

> You note that the implementation does not support
> ringing. This means 
> I can use the phone connected to the X100P to call
> out but cannot 
> receive calls, right?

Almost correct.  There's been some discussion of
adding ringing but there are two basic problems (1)
conveying the ringing signal from the PC to the
interface circuit, and (2) generating the ringing
current (which in the US is 86V AC at 20Hz, not
something that is just lying around in a typical PC)

You can receive calls though, you just need some way
of knowing when to pick up.

> Would I still
> need it [external interface circuit] if the phone 
> I use has an external power supply?

Phones that have an external power supply are no
different than ones that don't for the above purposes,
since they still depend on the line for talk battery.

> What is the problem with tone (DTMF) dialing?

It appears that the high amplitude of the DTMF tones causes a signal 
overload condition as they are received at the X100P.  The overload
causes a distorted waveform and consequently a "corrupted" copy of the
digital data as it is digitized by the card's A/D hardware.  This signal
distortion prevents the DSP logic in asterisk from properly decoding the
DTMF tones.  One user reported that it was possible to get the tones to
work reliably by applying attenuation in the analog interface.  If the
foregoing theories are correct, no amount of software attenuation would be
effective in resolving the problem, because the damage has been done before
any digital signal processing can be performed.  The chipset supports a
number of digital gain settings, which are all (apparently) set to mimimum
values, but this doesn't seem to be sufficient.  Further input and feedback
is welcome.


This information is believed to be correct and complete, and several folks have successfully used it. However, YMMV.

Questions? Email ikj1234i at yahoo dot com