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

Tzafrir Cohen reviewboard at asterisk.org
Mon Jun 17 04:31:54 CDT 2013


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

(Updated June 17, 2013, 9:31 a.m.)


Review request for Asterisk Developers.


Changes
-------

* Added 'dahdi create channels all'
* Do create all channels on startup
* Don't fail startup if a channel is misconfigured


Repository: Asterisk


Description (updated)
-------

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'.

'dahdi create channels' acts as a filter for process_dahdi() and such in DAHDI: it re-parses the whole configuration, but only attempts to create channels in the range.

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.

One current limitation is that each device's (or span's) configuration will need to be in a separate section, as if a channel is missing in a section, the rest of the section remains unconfigured.


Diffs (updated)
-----

  /trunk/channels/chan_dahdi.c 391921 

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


Testing
-------

Works well with analog devices. Seems to work with ISDN ones as well. Not fully complete, though.


Thanks,

Tzafrir Cohen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130617/3b5732ac/attachment.htm>


More information about the asterisk-dev mailing list