[asterisk-dev] [Code Review] dial by name in chan_dahdi
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Mon Mar 22 12:53:25 CDT 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/535/
-----------------------------------------------------------
(Updated 2010-03-22 12:53:25.689242)
Review request for Asterisk Developers.
Changes
-------
In this revision:
* The 'subdir' component may have subdirectories of its own
(e.g. /dev/dahdi/dir/sub/5)
- The channel name in the dialplan can now have extra '!' for subdirs:
Dial(DAHDI/dir!sub!5/12345678)
- In chan_dahdi.conf you need to set: subdir = dir/sub
* Fix a bug or two.
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 253749
/trunk/configs/chan_dahdi.conf.sample 253749
Diff: https://reviewboard.asterisk.org/r/535/diff
Testing
-------
Thanks,
Tzafrir
More information about the asterisk-dev
mailing list