[Asterisk-Users] Xorcom Rapid 0.9.0

Tzafrir Cohen tzafrir at technion.ac.il
Fri Dec 10 08:40:14 MST 2004


Hi

On Thu, Dec 09, 2004 at 02:12:13PM +0200, Tzafrir Cohen wrote:
> Hi
> 
> Version 0.9.0 of Xorcom Rapid Debian/GNU/Linux/Asterisk has just been
> released.
> 
> Main changes:
> 

[snip]

> * Automatic detection of the most common Zaptel cards

[snip]

Astrisk will simply abort with an incorrect Zaptel channel
configuration, as opposed to other channels that are optional. This
makes automatic detection of Zaptel cards even more important.

We wrote some detection scripts that do a great job of auto-detecting
the hardware we currently have. They are part of our modified Zaptel
package and we hope to push those changes to Debain and/or Asterisk. 

I'd like to give more details about the scripts. I would appreciate any
feedback from others here.

The basic script is /usr/sbin/genzaptelconf . It attempts to generate a
working /etc/zaptel.conf or /etc/asterisk/zapata.conf according to what
it sees on /proc/zaptel .

Originally it was just a glorified awk script without much logic inside.
However from the data in /proc/zaptel we have no way to tell if a
channel is available or not. The card we tested it with was a TDM400P
with just one FXS module.

Our simple test to tell if the channel is a working module or not was to
try to open it and read one byte from it (head -c1 </dev/zaptel/NUM) .
But we first had to verify that the channel is working. We did this by
running ztcfg with a temporary config file.

This worked fine for that card and for our FXO cards. But when we got 
to the E100P card the reading of the byte hanged. Therefore we decided
to skip it for the moment .


/usr/sbin/zaptel-detect uses genzaptelconf to detect which modules could
be loaded. It starts by rmmod-ing all zaptel modules. Then for each
module it loads the module and checks if the load of the module has
changed the size of the output of genzaptelconf. If not, then the module
probably does nothing.


genzaptelconf does not attempt to generate a complete zapata.conf.
Rather , it creates /etc/asterisk/zapate-channels.conf , which is
#include-d by the main zapata.conf . Is there such a trick possible with
zaptel.conf?

The format of zapata.conf doesn't really help auto-generation: If you
put something in one extension you should take care to remove it later,
so it won't affect others. This is very unlike sip.conf and others.


There is one more thing we would appreciate feedback about:
We included in our current user interface (a text-based menu) quite a 
few useful commands. Starting from simple ones, like 'asterisk -rx "show
uptime"' , a ping to the first nameserver from /etc/resolv.conf, etc. 

Any idea for additions to that menu (/usr/bin/rapid-menu in the package
rapid-scripts. It is actually a configuration file for pdmenu ) would be 
welcome.

-- 
Tzafrir Cohen                    +---------------------------+
http://xorcom.com/               |vim is a mutt's best friend|
mailto:tzafrir.cohen at xorcom.com  +---------------------------+



More information about the asterisk-users mailing list