[asterisk-dev] [Code Review] dial by name in chan_dahdi

Nick Lewis Nick.Lewis at atltelecom.com
Wed Jun 9 04:48:42 CDT 2010


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

Ship it!


This brings back terrible memories of hacking around the kernel to try to get the hardware drivers to load channels in a specified order. This feature neatly sidesteps the problem. Thanks

- Nick


On 2010-06-08 12:06:45, Tzafrir Cohen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/535/
> -----------------------------------------------------------
> 
> (Updated 2010-06-08 12:06:45)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Currently a name of a channel in chan_dahdi must (with some exception of trunk-groups syntax) rely on DAHDI channel numbers. Sadly channel numbers depend on the specific order of registration. Changing that seems to be quite difficult.
> 
> Thus we try to use the original open-by-device-file (rather than indirect open through /dev/dahdi/channel), and allow files to reside in sub-directories of /dev/dahdi .
> 
> Specifically, the file name must still be a number (to allow using the same ranges syntax). However it should be preceded with the string '<dirname>!' .
> 
> For instance we have: /dev/dahdi/work/dir/1 and /dev/dahdi/work/dir/2 that are symlinks to /dev/dahdi/9 and /dev/dahdi/10 (DAHDI channels 9 and 10), I can refer to them in chan_dahdi.conf as:
> 
>   channel => work!dir!1
>   channel => work!dir!2
> 
> Or:
>   channel => work!dir!1-2
> 
> And likewise can dial through them using:
> 
>   Dial(DAHDI/work!dir!1/123456)
> 
> Now that we have a naming scheme that does not depend on the specific load order of DAHDI devices, it should be safe to allow a configuration to continue even if some channels have failed. For this we allow setting
> 
>   ignore_failed_channels = true
> 
> in chan_dahdi.conf (it only makes sense to set it in the beginning of the [channels] section). This tells chan_dahdi not to fail even if a channel has failed to configure.
> 
> See also:
> http://svn.asterisk.org/dahdi/linux/team/tzafrir/sysfs
> http://svn.asterisk.org/dahdi/tools/team/tzafrir/sysfs
> https://reviewboard.asterisk.org/r/677
> 
> Current status: 
> 
> * Tested to basically work. 
> 
> TODO:
> * Can the original path be exposed to the dialplan?
>   The equivalent of:
>   Set(DAHDI_CHAN=${CUT(-,${CHANNEL}))}
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_dahdi.c 269082 
>   /trunk/configs/chan_dahdi.conf.sample 269082 
> 
> Diff: https://reviewboard.asterisk.org/r/535/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Tzafrir
> 
>




More information about the asterisk-dev mailing list