[asterisk-dev] [Code Review] 1598: chan_dahdi: create and destroy channels at run-time

Tzafrir Cohen reviewboard at asterisk.org
Thu Aug 8 14:55:42 CDT 2013



> On Aug. 7, 2013, 8:17 p.m., rmudgett wrote:
> > /trunk/channels/chan_dahdi.c, line 14134
> > <https://reviewboard.asterisk.org/r/1598/diff/8/?file=43814#file43814line14134>
> >
> >     Doing this here requires that all B channels are already destroyed.  Is this guaranteed by the DAHDI_EVENT_REMOVED event?  Maybe DAHDI_EVENT_REMOVED should delete the B channels before destroying the D channel?

Added explicit channel destruction here.

Note: we could have used a single call to dahdi_destroy_channel_range, but I'm not sure that I can rely on the span to be in the range of (pri->pvts[0].channel, pri->pvts[pri->numchans-1].channel).


- Tzafrir


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


On Aug. 6, 2013, 8:03 p.m., Tzafrir Cohen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1598/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2013, 8:03 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This code adds chan_dahdi the command 'dahdi create channels <range>' (where <range> is a single <n>-<m> or 'all') and updates 'dahdi destroy channel' with a similar 'dahdi destroy channels'.
> 
> This change is intended to provide a hook for a script running from udev once a span has been assigned ("registered") / unassigned ("unregistered") for its channels. The udev hook configures the span's channels with dahdi_cfg -S, and can then ask Asterisk to create ethe channels. See the scripts added to DAHDI-tools in 2.7.0.
> 
> This means that a separate DAHDI init script (running before the Asterisk one) would no longer be required. There is no longer a need to run a single command after all DAHDI devices are up.
> 
> If you use those new DAHDI settings you should set ignore_failed_channels in chan_dahdi.conf to avoid missing a channel failing the startup of chan_dahdi (with potentially other channels already available).
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_dahdi.c 396321 
> 
> Diff: https://reviewboard.asterisk.org/r/1598/diff/
> 
> 
> Testing
> -------
> 
> Works well with analog devices and mostly tested with ISDN devices.
> 
> 
> Thanks,
> 
> Tzafrir Cohen
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130808/234086c5/attachment.htm>


More information about the asterisk-dev mailing list