xpp: can use modern Asterisk hotplug support
authorOron Peled <oron.peled@xorcom.com>
Wed, 22 Oct 2014 19:02:58 +0000 (15:02 -0400)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Thu, 6 Nov 2014 11:29:19 +0000 (13:29 +0200)
commitf11b93765902777e011f4e667fd048bbcf1fd92e
tree638956fb69c58dad8e19690e0588c60f4c7935ed
parentcd6083b6ce65ea83f76aacac774e1315233c254d
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>
dahdi.init
init.conf.sample
xpp/astribank_hook