-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3157/
-----------------------------------------------------------

Review request for Asterisk Developers.


Repository: Asterisk


Description
-------

Recent versions of DAHDI allow making the initialization of DAHDI devices more 
asynchronous[1]. This should allow, among other things, starting Asterisk 
independently of DAHDI. If DAHDI starts after Asterisk, Asterisk needs to be 
notified of new DAHDI channels. If those channels are already configured in 
chan_dahdi.conf, this can be done by running "asterisk -rx 'dahdi create 
channels <start> <end>'".

(For more information, see [2])

As of DAHDI 2.8.0, DAHDI has udev hook hooks that eventually run this command 
after the span was configured. DAHDI 2.9.0 makes that script modular: it runs 
all the scripts in the directory /usr/share/dahdi/span_config.d in order. DAHDI 
currently installs /usr/share/dahdi/span_config.d/50-asterisk that runs that 
command, but this is really not the job of DAHDI: DAHDI can't really tell that 
Asterisk is installed on the system. If Asterisk wants to get the new spans, 
Asterisk should install this hook script.

Note that it should be harmless to install this even if DAHDI isn't installed 
on the system: you just added a useless script file. Though installing it 
probably does not make sense if you don't have DAHDI installed. If you have 
DAHDI installed and caling this script but don't have chan_dahdi.so or don't 
have those channels configured in chan_dahdi.conf than this will run but only 
cause some extra error messages. So it takes quite some bad luck to get it to 
cause damage. which is why I think it is safe to install it by default. In this 
patch I opted for simplicity and just installed it anyway to the same path. Let 
me know if you have any better ideas.

[1] This is still not the default in 2.9.0, but should eventually become the 
default in a future version. The code is all there.
[2] http://lists.digium.com/pipermail/asterisk-dev/2014-January/064713.html


Diffs
-----

  /trunk/contrib/scripts/dahdi_span_config_hook PRE-CREATION 
  /trunk/Makefile 406502 

Diff: https://reviewboard.asterisk.org/r/3157/diff/


Testing
-------


Thanks,

Tzafrir Cohen

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to