[asterisk-dev] dynamic spans: /etc/zaptel/dynamic.conf ?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri Mar 21 07:00:16 CDT 2008


Hi

As some of you might have noticed, recently Brett Carrington from
Redfone has submitted the driver for their TDMoE device. It uses a
different protocol than the current ztd-eth driver, and hence will be
added as an additional driver: ztd-ethmf.

http://bugs.digium.com/12241

While this one should get into Zaptel soon, it got me looking into the
whole "dynamic spans" in Zaptel, and I didn't really like what I saw.
Consider the following commet in the bug report:

  http://bugs.digium.com/12241#84346

(How to make a change without crashign things)

This is not a regression from the new driver, because the issues are
basically with the way dynamic spans work in Zaptel. 


A few words about dynamic spans: 

In zaptel.conf you can have:

  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.

The drivers we currently have are "loc" (a loopback to a local span) and
"eth" (TDMoE). The patch adds "ethmf" which is an improved TDMoE. 

I believe that part of the problem with dynamic spans is that spas are
generated as part of the run of ztcfg. ztcfg's job is to apply
configuration to spans. It should be safe to run twice (too many people
use 'ztcfg -vv' as a debugging aid). It should be safe to run it once
after a failure and then again in a successful run.

So my initial suggestion here is to move the "dynamic" keyword to a
different configuration file. I propose to do that by the way of
convension (at least first), not through code changes:

  # first load modules
  # then:
  if [ -r /etc/zaptel/dynamic.conf ]; then
    ztcfg -c /etc/zaptel/dynamic.conf
  fi
  
  # ...

  ztcfg

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list