Distributed Asterisk (Clustering/TDMoE)

TDMoE (Time Domain Multiplexing over Ethernet)

To use TDMoE you MUST have a zaptel interface configured somewhere on the network. It can be any zaptel interface, doesn't have to be a E400P, an X100P will do. Why? Timing. Samples. Something like that. Just do it. Of course a dummy ZAP interface like ztdummy or ztrtc might work, but I haven't tried it as yet. If somebody has please do update this.

What is TDMoE?

Well, we all know Ethernet right? Its probably the most popular network infrastructure on Layer2 that the IP world knows. Time-division multiplexing (TDM) puts multiple data streams in a single signal by separating the signal into many segments, each of a short duration (timing). Each individual data stream is reassembled at the receiving end based on this timing.

The circuit that combines signals at the source (transmitting) end of a communications link is known as a multiplexer. It accepts the input from each individual end user, breaks each signal into segments, and assigns the segments to the composite signal in a rotating, repeating sequence. The composite signal thus contains data from multiple senders. At the other end of the long-distance cable, the individual signals are separated out by means of a circuit called a demultiplexer, and routed to the proper end users. A two-way communications circuit requires a multiplexer/demultiplexer at each end of the long-distance, high-bandwidth cable. But, in TDMoE, * serves as the mux/demux. Lets look at the how the configuration is done first, and then do a practical example.

The configuration to define a dynamic span (TDMoX) basically entails FOUR parameters. Look at the sample config from zaptel. Its got an example in it, ala:


				# Next come the dynamic span definitions, in the form:
				# dynamic=<driver>,<address>,<numchans>,<timing>
				#
				# Where <driver> is the name of the driver (e.g. eth), <address> is the
				# driver specific address (like a MAC for eth), <numchans> is the number
				# of channels, and <timing> is a timing priority, like for a normal span.
				# use "0" to not use this as a timing source, or prioritize them as
				# primary, secondary, etc.  Note that you MUST have a REAL zaptel device
				# if you are not using external timing.
				#
				# dynamic=eth,eth0/00:02:b3:35:43:9c,24,0
				

Timing Notes: 0 for no timing, 1 for primary, 2 for secondary, the difference is that it uses the primary to turn the zaptel gears unless it's in alarm, in which case it will take from the secondary and so on.

The driver is generally "eth" since currently we don't have any other TDMoX drivers, although FireWire would be very very nice. [kram]

The address is

<eth interface>/<macaddress>[/subaddr]

The sub address is optional, and allows you to define more than one span on a single eth interface / mac address pair

By configuring this, you end up with a new span, similar to how the T1/E1 spans configured for the E/Tx00P cards. Access to the channels configured above is via /etc/asterisk/zapata.conf.

You can configure signalling and all just as though they were T1's or E1's, so you can run RBS or you can run PRI or whatever, they even generate RED and YELLOW alarm just like real T1's and E1's. We're still debating whether you can run CCS on it.

You do NOT need to configure a specific span=blah,blah in zaptel.conf for this, the dynamic span definition will take care of that.

Remember that TDMoE works at the Ethernet layer, all you need to configure is MAC addresses and Ethernet interfaces.... so in theory you could TDMoE over 802.11 (low-cost last mile) or CIPE (encrypted PRI), the possibilities are limitless (well as limitless as csmacd can get)... IP does not come into play here at all...

-- SIMPLE 2 MINUTE EXAMPLE #1 --

suppose, if i have two * boxen running... lets say merry and pippin...

merry has an X100P in it and a NIC, pippin just has a NIC

in merry zaptel.conf we have --------


				fxsls=1                                 # this be the X100P
				dynamic=eth,eth0/00:D0:B7:89:E3:86,30,0 # put the MAC of pippin NIC here
				e&m=2-31                            # you can use ANY signalling
				

in pippin zaptel.conf we have --------


				dynamic=eth,eth0/00:50:FC:65:33:A1,30,1		# note the timing "1", merry's mac
				e&m=1-30					# same signalling as merry
				

from this point on its like any of the friendly zaptel channels we're already used to....

in merry zapata.conf we have ----------


				signalling=em
				channel=>2-31
				

in pippin zapata.conf we have ---------


				signalling=em
				channel=>1-30
				

load the appropriate modules, ztcfg on merry, zttool, you should have RED in the alarms.... and a dynamic span configured (not up, but configured)

do the same on pippin, bingo, the alarms should turn to OK, and you have the zap channels available for use....


				[root@pippin ~]$ lsmod
				Module                  Size  Used by    Tainted: P
				ztd-eth                 4032   0  (autoclean) (unused)
				ztdynamic               8544  30  (autoclean) [ztd-eth]
				zaptel                177088  60  [ztdynamic]
				ppp_generic            27392   0  [zaptel]
				slhc                    6844   0  [ppp_generic]
				

This listing is with Asterisk running, and zapata using the channels. If you got this far, you're good to go.

Enjoy... and mail any samples, suggestions, improvements... always welcome

Hail Asterisk !

TODO: multiple Ethernet cards (local and remote), other signalling examples, dummy eth driver to loopback test, caveats, benefits of TDMoE, comparison of various signalling, cook dinner