Summary: | DAHLIN-00338: dynamic SPAN | ||
Reporter: | Pavel Selivanov (biohumanoid) | Labels: | |
Date Opened: | 2014-04-10 05:09:47 | Date Closed: | 2019-05-31 09:55:38 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | dahdi (the module) dahdi_dynamic |
Versions: | 2.9.1.1 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) dahdi_tdmox_r818.tar.gz ( 1) dahdi_tdmox.r799.tar.gz ( 2) dahdi-linux_tdmox_v1.patch ( 3) dahdi-linux_tdmox_v2.patch ( 4) dahdi-linux_tdmox.patch ( 5) dahdi-tools_tdmox_v2.patch ( 6) dahdi-tools_tdmox.patch ( 7) elf2-ae.conf ( 8) tdmox_genconf | |
Description: | Dear all,
I am looking how to support dynamic SPANs in dahdi_genconf & FreePBX dahdiconfig module (Elastix, Trixbox, AsteriskNow,...). Seems like I will have to code a lot, produce a lot of patches with low chance for submitting them in trunks. The main problem - is the way dynamic was designed. dynamic SPAN's are allocated in system.conf. That's the file, dahdi_genconf should generate. Moreover, all other devices (SPANs) are absolutely the same for DAHDI, but not the dynamic SPAN. It is even initialized with a separate code in dahdi_cfg (DAHDI_DYNAMIC_CREATE, DAHDI_DYNAMIC_DESTROY). I'd like to implement an alternative dynamic SPAN implementation, similar to Xorcom's XPP implementation. dynamic.conf - configuration file, used to register SPAN. dynamic=eth,eth0/00:02:b3:35:43:9c,24,0 I can extend functionality and describe SPAN & channels: SPAN signalling (CAS/CCS) supported signalling on channels (LoopStart, ...) e.t.c. After loading configuration, /proc/dahdi/N will present enought information, to make dahdi_scan, dahdi_genconf & FreePBX happy. As happy, like they have local card with local SPAN. The question is - do I have a chance to submit that alternative "dynamic" implementation to the trunk ? In other words, should I take about your coding style ? Thank you. | ||
Comments: | By: Russ Meyerriecks (rmeyerriecks) 2014-04-10 10:17:31.289-0500 Pavel, Patches are always welcome. This sounds like a great addition to the dynamic spans system :-) By: Pavel Selivanov (biohumanoid) 2014-05-12 13:36:06.506-0500 I've attached alternative TDMoX/TDMoE implementation (revision 799). The idea is simple. "dahdi_tdmox" copy configuration files from /etc/dahdi/tdmox/ copied to /sys/bus/dahdi_tdmox/.... Once it copy the configuration - dahdi_tdmox do "dahdi_register". Now, the SPAN is registered (like PCI subsystem called "probe" for tor2), and it can be configured with dahdi_cfg as any other "traditional" SPAN. This implementation DOES NOT register any additional ioctl (no need for dahdi_ioctl_dynamic), DOES NOT need any support code in dahdi_cfg (like dynamic=, DAHDI_DYNAMIC_CREATE, and so on). It's just a plain SPAN, as any other SPAN. There are 2 files to patch: /etc/init.d/dahdi (to call dahdi_tdmox), Chans.pm & Span.pm . 14 lines total. Update: I've occasionally included lines to support our PRI card. You can cut it off, I'll create a new issue. Tested freepbx-2.11 with: 1. digital SPAN (span-1), pri_cpe 2. analog SPAN (span-2), fxo_ls & fxs_ls lines. No patches to freepbx necessary, just to dahdi_genconf & co. By: Pavel Selivanov (biohumanoid) 2014-05-12 13:38:03.330-0500 I'm ready to answer your questions. If it's necessary - I can create an issue with type "New Feature". By: Pavel Selivanov (biohumanoid) 2014-05-15 09:33:36.531-0500 Some fixes: 1. Work with old kernels (2.6.18) 2. Some configuration examples 3. Some patches for dahdi_genconf to work with TDMoX devices. tested with dists: FreePBX 2.11 Elastix 2.4.0 By: Russ Meyerriecks (rmeyerriecks) 2014-05-15 10:20:47.377-0500 Pavel, Would you be willing to re-organize your tarball into actual patches against the dahdi-linux and dahdi-tools git trees? This has a bit of information about working with dahdi source: https://wiki.asterisk.org/wiki/display/DAHDI/Digium+Asterisk+Hardware+Device+Interface It's not a problem if you can't, I'll handle it eventually. By: Pavel Selivanov (biohumanoid) 2014-05-23 02:25:48.490-0500 Added some features, testing for 2 day. Than I will produce 1 patch file for tools, 1 patch file for linux. By: Pavel Selivanov (biohumanoid) 2014-05-28 04:16:48.172-0500 Finished. Please check, if I patched dahdi-tools/Makefile as I should. To check - you can copy tdmox.sample to tdmox, type dahdi_tdmox. It will start 2 SPAN's. Now you can configure them as a typical SPAN. watch -n 0.3 cat /proc/dahdi/tdmox_stats for statistics. echo > /proc/dahdi/tdmox_stats to cleat statistics. By: Pavel Selivanov (biohumanoid) 2014-05-28 04:19:27.105-0500 It the final patch, I greatly improved tasklet code, added statistics. Now, It can sync even to coretimer (250hz). By: Pavel Selivanov (biohumanoid) 2014-05-28 06:40:45.817-0500 Changed sh to bash (debian). Please, use the new one. By: Pavel Selivanov (biohumanoid) 2014-06-02 12:47:04.792-0500 Some tasklet fixes. Some sync fixes. By: Pavel Selivanov (biohumanoid) 2014-06-29 13:11:19.887-0500 Hi, Any chances to see my driver in trunk ? By: Russ Meyerriecks (rmeyerriecks) 2014-08-06 14:23:08.840-0500 I imported the patch set and pushed them out to the email list for the review process. By: Pavel Selivanov (biohumanoid) 2014-08-07 07:17:54.150-0500 I've attached an up-to-date patches. dahdi-linux_tdmox_v2.patch : Capable with latest kernels (procfs) Sysfs cleanup. dahdi-tools_tdmox_v2.patch : Additional option for dahdi_tdmox By: Pavel Selivanov (biohumanoid) 2014-08-07 07:35:35.320-0500 I will try to simplify testing modules. I have attached 2 files, tdmox_genconf & elf2-ae.conf . elf2-ae.conf is a sample configuration file for PRI TDMOE span. It should be placed to /etc/dahdi/tdmox/elf2-ae.conf with Read & eXecute permissions. tdmox_genconf is a "vendor-specific" support tool. It will be called if you execute elf2-ae.conf and it will generate all the files in /etc/dahdi/tdmox/span-1 (for dahdi_tdmox). I have not included them to the patches, as it's vendor-specific. By: Pavel Selivanov (biohumanoid) 2014-11-07 11:26:35.002-0600 I wonder if there are any comments ? I'm using it for 6 months. Works fine. I'd like to share a ready-to-use bundle, for ease testing the driver. http://parabel.ru/d/software/dahdi/dahdi_2.9.2%2B2.9.2-parabel_2.9.2.1.tar.bz2 ./build.sh ./install.sh Copy any config from /etc/dahdi/tdmox/samples to /etc/dahdi/tdmox/ , then execute it. reboot |