Commit Graph

8 Commits

Author SHA1 Message Date
Oron Peled f11b937659 xpp: can use modern Asterisk hotplug support
* New asynchronous behavior is used only when two conditions are met:
  - Finding new $ASTERISK_SUPPORTS_DAHDI_HOTPLUG=yes in /etc/dahdi/init.conf
    This should be set only when Asterisk support hotplug and configured
    to use it (no_failed_channels==1).
  - DAHDI auto_assign_spans==0

* Adapt /usr/share/dahdi/astribank_hook:
  - Refactor old twinstar behavior into functions
  - Add new behavior in a function (just enable the Asrribank watchdog)
  - Call the correct function.

* Adapt init script:
  If asynchronous behavior is on, don't wait for all Astribanks to
  finish initialization (it's enough that we saw all/some of them)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2014-11-06 13:29:19 +02:00
Oron Peled 1292ea9078 registration-order: Added dahdi_auto_assign_compat
Maintains the original registration order as was before span
assignments. Should allow seemless trannsition to
dahdi.auto_assign_spans=0

* The idea:
  - We stop handling in udev the case of missing
    /etc/dahdi/assigned-spans.conf
  - Instead we rely on "registration_time" dahdi_device attribute from
    DAHDI-linux
  - Then, we can sort the devices and assign their spans in
    /etc/init.d/dahdi
* Mechanics:
  - From /etc/init.d/dahdi, we run a new 'dahdi_auto_assign_compat'
    script (after "waitfor_xpds" etc.)
  - In this script we "auto" assign spans of non-Astribank devices
  - In the end of the script we run "dahdi_registration" which
    does the same for Astribank devices.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2014-03-25 14:51:29 +02:00
Russ Meyerriecks 91768d360c dahdi.init: Don't exit on lack of /etc/dahdi/system.conf
auto_spans and dahdi_cfg -c are valid config methods which may not have a
/etc/dahdi/system.conf. We already check for the existance of the dahdi modules
before the case start, so I think it's safe to remove this section.

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2014-01-23 16:25:56 -06:00
Shaun Ruffell c27664dc1b dahdi.init: Remove spurious "Missing '/sys/bus/astribanks/drivers/xppdrv/sync'".
The xpp_sync will fail if there are not any Astribank devices loaded. Check for
existence of the tools before trying to sync.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-11-24 10:06:11 -06:00
Tzafrir Cohen de23ca9c1a Don't fail init script if no modules
No point in loading the modules if nobody built them yet. It is a common
case for one to install the userspace tools package but not (yet?) build
the modules. See, e.g.  http://bugs.debian.org/706046 .

With this changeset, we exit gracefully in such a case.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-23 17:16:27 -05:00
Tzafrir Cohen ed3da234d7 dahdi.init: LSB short description
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9830 17933a7a-c749-41c5-a318-cba88f637d49
2011-03-16 14:23:09 +00:00
Shaun Ruffell 3122b143a3 dahdi.init: Remove reference to dahdi_dummy.
Module 'dahdi_dummy.ko' is no longer needed for DAHDI to provide timing,
therefore we can remove the explicit load of dahdi_dummy, which by
default is aliased to dahdi.ko anyway.  If you've edited the DAHDI
Kbuild file in order to build dahdi_dummy explicitly, then you should
add dahdi_dummy to /etc/dahdi/modules in order to load it, but this is
not needed for normal operation.

(issue #17959)
Reported by: glen201

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9309 17933a7a-c749-41c5-a318-cba88f637d49
2010-09-07 18:27:57 +00:00
Asterisk Development Team 466357f5c2 Import DAHDI-Tools r9159
This revision of DAHDI-Tools is the base revision for the switch to
git.

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/tools/trunk@9159
2010-08-18 13:49:24 +00:00