[Asterisk-Users] zaptel init script

Tzafrir Cohen tzafrir at cohens.org.il
Wed Sep 7 01:44:48 MST 2005


On Wed, Sep 07, 2005 at 09:32:58AM +0200, Christian Richter wrote:
> Hi List,
> 
> we've made a litle script which is called /etc/init.d/zaptel. It scans 
> the pci bus and creates by request a /etc/zaptel.conf and a 
> /etc/asterisk/zapata.conf.
> 
> Also it loads the modules automagically.
> 
> If there are volunteers who want to try this out (it'll make first setup 
> of an asterisk with digium cards easier) just grab it at:
> 
> www.beronet.com/downloads/zaptel-init.tar.gz
> 
> and type make install after unpacking.
> 
> Good Luck ;)

Are you aware of http://tzafrir.org.il/genzaptelconf ?

That script is intended for one-time discovery. The current zaptel init.d
script in Xorcom Rapid is much simpler and has very little discovery: 
if no zaptel card module was loaded, it will load ztdummy.

And who is expected to actually load a card driver at boot time? Well,
the system has all that information and it is the job of the hotplug
script to extract it and load the relevant modules. So far it has done
that very well.

My aproach in the script was different: parse information in 
/proc/zaptel/ . Though I admit that the end result is an over-grown bash
script . The atvantage is that it is easy to debug: /proc/zaptel/n only
exsits if the module was loaded. I don't have to hope which card belongs
to which span because I look at spans directly.

There are some things I was not so happy with in my script. The defaults
for ISDN switch types (both BRI and PRI) are probably not good enough.
And there is no reasonable way to get decent per-channel or per-span
configuration into the auto-generated parts of zapata.conf .

-- 
Tzafrir Cohen         | tzafrir at jbr.cohens.org.il | VIM is
http://tzafrir.org.il |                           | a Mutt's  
tzafrir at cohens.org.il |                           |  best
ICQ# 16849755         |                           | friend



More information about the asterisk-users mailing list