[asterisk-biz] T1 Y cable

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Tue Mar 14 07:37:14 MST 2006


On Tuesday 14 March 2006 08:46, Herman Webley wrote:
> No, the switch wouldn't try to detect a disconnect. It would rely on the
> smarts of PC servers. They would use linux HA heartbeat or similar. When
> the secondary detects failure of the primary, it would take control of
> the T1 line.
>
> Basically I want all the smarts to be in the (already smart?) server
> leaving the switch a cheap simple item with little to go wrong.

Get a pair of 5V or 6V DPDT relays, some diodes (2 1N4007, 1 1N4742), a 1k 
1/4W resistor and a small-signal NPN transistor (2N2222 or equivalent).  Wire 
the coils of the relays in series, one leg to +12, the other to the collector 
of the transistor.  Take a 1N4007, anode to the collector of the transistor, 
cathode to the cathode of a 1N4742 (12V zener diode).  Anode of the 1N4742 to 
+12V.  Take another 1N4007, anode to emitter of the transistor, cathode to 
the collector.  one leg of the 1k resistor to the base of the transistor, the 
other to a parallel port pin.  Emitter of the transistor to your common (if 
you're using the PC power supply for the 12V, use the ground lead for common.  
If you're using a separate supply, make sure the common of the supply is tied 
to a common on the PC power supply.

Now simply take the common legs of the relays (you'll have four common legs, 
one for TX+/- and RX+/- on your incoming T1) and four normally open contacts, 
and four normally closed contacts.  Your "Asterisk #1" box's T1 will be 
hooked up to the normally closed contacts, and your "Asterisk #2" box's T1 
will be connected to the normally open ones.  Wire it up such that the 
incoming T1 will appear to be connected directly to Asterisk #1 with the 
relays de-energized, and that the incoming T1 will appear to be connected 
directly to Asterisk #2 when the relays are energized.  Your parallel port 
connection will be connected to the computer you want to decide which 
Asterisk box the T1 goes to.

Variations on this could be to drive it off the DTR signal of a serial port 
and power it from there as well, creating a ~15-20V supply from the serial 
port signals, using a little microcontroller to talk to to flip the relays, 
etc.

The diodes are there to protect the transistor from back-emf generated when 
the transistor switches off, and also to protect the power supply from 
spiking, which is especially important if you're planning on driving this 
from the PC's 12V supply.  I suggested using 5V relays and driving them in 
series -- you'll be overdriving them slightly (by about 1.25V) but it won't 
be too bad and it beats having a "soft" relay action which may cause other 
troubles.  If it's too strong just add a diode between common and the emitter 
of the transistor, or calculate a 1V drop at the the current levels you see 
and insert the appropriate resistor.

-A.



More information about the asterisk-biz mailing list