[asterisk-dev] [Code Review] dial by name in chan_dahdi
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Thu Mar 11 13:47:13 CST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/535/
-----------------------------------------------------------
(Updated 2010-03-11 13:47:13.282150)
Review request for Asterisk Developers.
Changes
-------
The chan_dahdi.conf part changed: 'subdir' is now a (channel-specific) configuration item. This means that parsing of channel numbers will basically work as before.
chan_dahdi.conf.sample was updated.
Summary
-------
Currently a name of a channel in chan_dadhi 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 ope-by-device-file (rather than indert open through /dev/dahdi/channel), and allow files to reside in subdirectories 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/1 and /dev/dahdi/work/2 that are the devices <196,9>, <196,10> (DAHDI channels 9 and 10), I can refer to them in chan_dahdi.conf as:
channel => work!1
channel => work!2
And likewise can dial through them using:
Dial(DAHDI/work!1/123456)
See also Oron's older asterisk-dev message at http://lists.digium.com/pipermail/asterisk-dev/2008-July/033805.html
Current status:
* Tested to basically work.
TODO:
* At the DAHDI side two major things are missing:
1. Device files for channel numbers > 249
2. More automated generation of device files.
* Adapt better to Asterisk coding style.
Diffs (updated)
-----
/trunk/channels/chan_dahdi.c 251180
/trunk/configs/chan_dahdi.conf.sample 251180
Diff: https://reviewboard.asterisk.org/r/535/diff
Testing
-------
Thanks,
Tzafrir
More information about the asterisk-dev
mailing list