<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/3157/">https://reviewboard.asterisk.org/r/3157/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By Tzafrir Cohen.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/contrib/scripts/dahdi_span_config_hook <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/Makefile <span style="color: grey">(406502)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3157/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>