[asterisk-dev] A plan for span

Shaun Ruffell sruffell at digium.com
Tue Jul 8 12:04:50 CDT 2008

Shaun Ruffell wrote:
> Tzafrir Cohen wrote:
>> So far so good. But where are the problems?
>> One problem is that we can never tell when "all of the devices have been
>> plugged. We get udev events for a device that is plugged. Nobody
>> notifies us that "all the devices were plugged". How long should we
>> wait?
> The dahdi_registration tool could be configured to know *all* the devices that 
> it expects to show up, and wait a configurable number of seconds for them. 
> Similarly to how the zaptel init script waits for the /dev/zap devices to show up.
>> And then suppose we plugged all the devices. The sysadmin can suddenly
>> plug in a new one. Right now it will be the last to register. But
>> chances are that on next reboot it will be "somewhere in the middle".
>> And thus the configuration that works now will break after reboot.
> In this case, since the dahdi_registration utility is loading devices based no 
> unique name, and the new device would presumably have a unique name, it would 
> be registered in that same order the next time the system is booted.

Another thought...the dahdi_register could be run by the hotplug script and it 
could know what order spans need to be registered in (via config file) and 
which devices are already registered (via sysfs attribute). If the new span is 
the next one to be registered, register it and any other present spans that are 
there waiting to be registered in order.

But if you do something like that, you would still need an option to wait until 
all the devices are present before you start Asterisk.  But at least the 
hotplug script could then register the devices as they show up if that is 
important (?)

More information about the asterisk-dev mailing list