Bertrand LUPART - Linkeo.com
2016-Apr-12 14:36 UTC
[asterisk-users] Debian 8.4 : dahdi startup scripts ?
Hello, I just made a asterisk / dahdi fresh install on Debian 8.4, and ended up with the following packages : $ sudo dpkg -l|grep -Ei 'dahdi|asterisk|libpri' ii asterisk 1:11.13.1~dfsg-2+b1 amd64 Open Source Private Branch Exchange (PBX) ii asterisk-config 1:11.13.1~dfsg-2 all Configuration files for Asterisk ii asterisk-core-sounds-en 1.4.22-1 all asterisk PBX sound files - US English ii asterisk-core-sounds-en-gsm 1.4.22-1 all asterisk PBX sound files - en-us/gsm ii asterisk-dahdi 1:11.13.1~dfsg-2+b1 amd64 DAHDI devices support for the Asterisk PBX ii asterisk-modules 1:11.13.1~dfsg-2+b1 amd64 loadable modules for the Asterisk PBX ii asterisk-moh-opsound-gsm 2.03-1 all asterisk extra sound files - English/gsm ii asterisk-voicemail 1:11.13.1~dfsg-2+b1 amd64 simple voicemail support for the Asterisk PBX ii dahdi 1:2.10.0.1-1 amd64 utilities for using the DAHDI kernel modules ii dahdi-firmware-nonfree 2.10.0-1 all DAHDI non-free firmware ii dahdi-linux 1:2.10.0.1~dfsg-1 all DAHDI telephony interface - Linux userspace parts ii dahdi-modules-3.16.0-4-amd64:amd64 1:2.10.0.1~dfsg-1+3.16.7-ckt25-2 amd64 DAHDI modules for Linux (kernel 3.16.0-4-amd64) ii dahdi-source 1:2.10.0.1~dfsg-1 all DAHDI telephony interface - source code for kernel driver ii libpri1.4 1.4.15-1 amd64 Primary Rate ISDN specification library However, i can't find any dahdi startup script, neither init.d neither systemd fashion. $ sudo dpkg -l|grep -Ei 'dahdi'|cut -d " " -f3 |xargs dpkg -L|grep -E 'init.d|system' /usr/share/doc/dahdi/examples/system.conf.sample.gz /etc/init.d Am I missing something? Thank you, -- Bertrand LUPART
On Tue, Apr 12, 2016 at 04:36:58PM +0200, Bertrand LUPART - Linkeo.com wrote:> I just made a asterisk / dahdi fresh install on Debian 8.4, and ended up with the following packages : > [...] > However, i can't find any dahdi startup script, neither init.d neither systemd fashion.The dahdi package (version 1:2.10.0.1-1) contains /etc/init.d/dahdi -- Eric Cooper e c c @ c m u . e d u
Bertrand LUPART - Linkeo.com
2016-Apr-12 16:47 UTC
[asterisk-users] Debian 8.4 : dahdi startup scripts ?
Hi Eric,> On 12 avr. 2016, at 17:48, Eric Cooper <ecc at cmu.edu> wrote: > > On Tue, Apr 12, 2016 at 04:36:58PM +0200, Bertrand LUPART - Linkeo.com wrote: >> I just made a asterisk / dahdi fresh install on Debian 8.4, and ended up with the following packages : >> [...] >> However, i can't find any dahdi startup script, neither init.d neither systemd fashion. > > The dahdi package (version 1:2.10.0.1-1) contains /etc/init.d/dahdiMine only contain /etc/init.d but not the dahdi script which should be inside : $ sudo dpkg -l dahdi ii dahdi 1:2.10.0.1-1 amd64 utilities for using the DAHDI kernel modules $ sudo dpkg -L dahdi [?] /etc /etc/init.d $ dpkg -c /var/cache/apt/archives/dahdi_1%3a2.10.0.1-1_amd64.deb [?] drwxr-xr-x root/root 0 2014-10-26 18:48 ./etc/ drwxr-xr-x root/root 0 2014-10-26 18:48 ./etc/init.d/ $ md5sum /var/cache/apt/archives/dahdi_1%3a2.10.0.1-1_amd64.deb Tried to download the package from another mirror, same md5, no init script. This is consistent with this : https://packages.debian.org/jessie/amd64/dahdi/filelist Maybe you did upgrade from another dahdi version and you kept the script from it ? I manually downloaded dahdi_2.5.0.1-2_amd64.deb and extracted /etc/init.d/dahdi , I hope no side effect. $ diff -u dahdi_files_2.5.0.1 dahdi_files_2.10.0.1 --- dahdi_files_2.5.0.1 2016-04-12 16:40:27.779886736 +0000 +++ dahdi_files_2.10.0.1 2016-04-12 16:40:36.515886917 +0000 @@ -1,7 +1,10 @@ ./ ./etc/ ./etc/init.d/ -./etc/init.d/dahdi +./lib/ +./lib/udev/ +./lib/udev/rules.d/ +./lib/udev/rules.d/60-dahdi.rules ./usr/ ./usr/sbin/ ./usr/sbin/astribank_allow @@ -9,18 +12,18 @@ ./usr/sbin/astribank_is_starting ./usr/sbin/astribank_tool ./usr/sbin/dahdi_cfg -./usr/sbin/dahdi_diag ./usr/sbin/dahdi_genconf ./usr/sbin/dahdi_hardware ./usr/sbin/dahdi_maint ./usr/sbin/dahdi_monitor ./usr/sbin/dahdi_registration ./usr/sbin/dahdi_scan +./usr/sbin/dahdi_span_assignments +./usr/sbin/dahdi_span_types ./usr/sbin/dahdi_test ./usr/sbin/dahdi_tool -./usr/sbin/fpga_load +./usr/sbin/dahdi_waitfor_span_assignments ./usr/sbin/fxotune -./usr/sbin/fxstest ./usr/sbin/lsdahdi ./usr/sbin/sethdlc ./usr/sbin/twinstar @@ -29,6 +32,15 @@ ./usr/share/ ./usr/share/dahdi/ ./usr/share/dahdi/astribank_hook +./usr/share/dahdi/dahdi_auto_assign_compat +./usr/share/dahdi/dahdi_handle_device +./usr/share/dahdi/dahdi_span_config +./usr/share/dahdi/handle_device.d/ +./usr/share/dahdi/handle_device.d/10-span-types +./usr/share/dahdi/handle_device.d/20-span-assignments +./usr/share/dahdi/span_config.d/ +./usr/share/dahdi/span_config.d/10-dahdi-cfg +./usr/share/dahdi/span_config.d/20-fxotune ./usr/share/dahdi/waitfor_xpds ./usr/share/dahdi/xpp_fxloader ./usr/share/doc/ @@ -37,33 +49,15 @@ ./usr/share/doc-base/dahdi.astribank ./usr/share/doc/dahdi/ ./usr/share/doc/dahdi/changelog.Debian.gz -./usr/share/doc/dahdi/changelog.gz ./usr/share/doc/dahdi/copyright -./usr/share/doc/dahdi/dahdi_cfg.8 -./usr/share/doc/dahdi/dahdi_cfg.8.html -./usr/share/doc/dahdi/dahdi_diag.8 -./usr/share/doc/dahdi/dahdi_diag.8.html -./usr/share/doc/dahdi/dahdi_monitor.8 -./usr/share/doc/dahdi/dahdi_monitor.8.html -./usr/share/doc/dahdi/dahdi_scan.8 -./usr/share/doc/dahdi/dahdi_scan.8.html -./usr/share/doc/dahdi/dahdi_test.8 -./usr/share/doc/dahdi/dahdi_test.8.html -./usr/share/doc/dahdi/dahdi_tool.8 -./usr/share/doc/dahdi/dahdi_tool.8.html ./usr/share/doc/dahdi/examples/ +./usr/share/doc/dahdi/examples/50-asterisk +./usr/share/doc/dahdi/examples/assigned-spans.conf.sample ./usr/share/doc/dahdi/examples/genconf_parameters.gz ./usr/share/doc/dahdi/examples/init.conf.sample ./usr/share/doc/dahdi/examples/modprobe.conf.sample +./usr/share/doc/dahdi/examples/span-types.conf.sample ./usr/share/doc/dahdi/examples/system.conf.sample.gz -./usr/share/doc/dahdi/fxotune.8.gz -./usr/share/doc/dahdi/fxotune.8.html -./usr/share/doc/dahdi/fxstest.8 -./usr/share/doc/dahdi/fxstest.8.html -./usr/share/doc/dahdi/patgen.8 -./usr/share/doc/dahdi/patgen.8.html -./usr/share/doc/dahdi/pattest.8 -./usr/share/doc/dahdi/pattest.8.html ./usr/share/doc/dahdi/README.Astribank.gz ./usr/share/doc/dahdi/README.Astribank.html ./usr/share/doc/dahdi/README.Debian @@ -77,17 +71,18 @@ ./usr/share/man/man8/astribank_is_starting.8.gz ./usr/share/man/man8/astribank_tool.8.gz ./usr/share/man/man8/dahdi_cfg.8.gz -./usr/share/man/man8/dahdi_diag.8.gz ./usr/share/man/man8/dahdi_genconf.8.gz ./usr/share/man/man8/dahdi_hardware.8.gz +./usr/share/man/man8/dahdi_maint.8.gz ./usr/share/man/man8/dahdi_monitor.8.gz ./usr/share/man/man8/dahdi_registration.8.gz ./usr/share/man/man8/dahdi_scan.8.gz +./usr/share/man/man8/dahdi_span_assignments.8.gz +./usr/share/man/man8/dahdi_span_types.8.gz ./usr/share/man/man8/dahdi_test.8.gz ./usr/share/man/man8/dahdi_tool.8.gz -./usr/share/man/man8/fpga_load.8.gz +./usr/share/man/man8/dahdi_waitfor_span_assignments.8.gz ./usr/share/man/man8/fxotune.8.gz -./usr/share/man/man8/fxstest.8.gz ./usr/share/man/man8/lsdahdi.8.gz ./usr/share/man/man8/twinstar.8.gz ./usr/share/man/man8/xpp_blink.8.gz @@ -97,9 +92,12 @@ ./usr/share/perl5/Dahdi/Chans.pm ./usr/share/perl5/Dahdi/Config/ ./usr/share/perl5/Dahdi/Config/Gen/ +./usr/share/perl5/Dahdi/Config/Gen/Assignedspans.pm ./usr/share/perl5/Dahdi/Config/Gen/Chandahdi.pm +./usr/share/perl5/Dahdi/Config/Gen/Freepbxdb.pm ./usr/share/perl5/Dahdi/Config/Gen/Modules.pm ./usr/share/perl5/Dahdi/Config/Gen.pm +./usr/share/perl5/Dahdi/Config/Gen/Spantypes.pm ./usr/share/perl5/Dahdi/Config/Gen/System.pm ./usr/share/perl5/Dahdi/Config/Gen/Unicall.pm ./usr/share/perl5/Dahdi/Config/Gen/Users.pm Thank you, -- Bertrand LUPART
On Tue, Apr 12, 2016 at 04:36:58PM +0200, Bertrand LUPART - Linkeo.com wrote:> Hello, > > > I just made a asterisk / dahdi fresh install on Debian 8.4, and ended up with the following packages : > > $ sudo dpkg -l|grep -Ei 'dahdi|asterisk|libpri' > ii asterisk 1:11.13.1~dfsg-2+b1 amd64 Open Source Private Branch Exchange (PBX) > ii asterisk-config 1:11.13.1~dfsg-2 all Configuration files for Asterisk > ii asterisk-core-sounds-en 1.4.22-1 all asterisk PBX sound files - US English > ii asterisk-core-sounds-en-gsm 1.4.22-1 all asterisk PBX sound files - en-us/gsm > ii asterisk-dahdi 1:11.13.1~dfsg-2+b1 amd64 DAHDI devices support for the Asterisk PBX > ii asterisk-modules 1:11.13.1~dfsg-2+b1 amd64 loadable modules for the Asterisk PBX > ii asterisk-moh-opsound-gsm 2.03-1 all asterisk extra sound files - English/gsm > ii asterisk-voicemail 1:11.13.1~dfsg-2+b1 amd64 simple voicemail support for the Asterisk PBX > ii dahdi 1:2.10.0.1-1 amd64 utilities for using the DAHDI kernel modules > ii dahdi-firmware-nonfree 2.10.0-1 all DAHDI non-free firmware > ii dahdi-linux 1:2.10.0.1~dfsg-1 all DAHDI telephony interface - Linux userspace parts > ii dahdi-modules-3.16.0-4-amd64:amd64 1:2.10.0.1~dfsg-1+3.16.7-ckt25-2 amd64 DAHDI modules for Linux (kernel 3.16.0-4-amd64) > ii dahdi-source 1:2.10.0.1~dfsg-1 all DAHDI telephony interface - source code for kernel driver > ii libpri1.4 1.4.15-1 amd64 Primary Rate ISDN specification library > > > However, i can't find any dahdi startup script, neither init.d neither systemd fashion. > > $ sudo dpkg -l|grep -Ei 'dahdi'|cut -d " " -f3 |xargs dpkg -L|grep -E 'init.d|system' > /usr/share/doc/dahdi/examples/system.conf.sample.gz > /etc/init.d > > > Am I missing something?Yes. README.Debian[1], included as /usr/share/doc/dahdi/README.debian . README.Debian (.gz, if it's long enough) is a file for some extra documentation by the packager. See the section about "Automatic startup" there. The only real use the DAHDI init script has is for interactive module loading / unloading. Modprobe is not useful on its own, as DAHDI includes a set of modules (especially if you use Astribanks. There a bit of extra magic besides the recursive rmmod was added). Furthermore, there is really no point is removing of modules at system shutdown. It only wastes time (and some CPU cycles, if you care about power) and increases the chances of exposing bugs at that time. IIRC the Asterisk package in Jessie lacks the extra script to get the configured DAHDI channels into Asterisk[2]. You may need to drop it yourself to /usr/share/dahdi/span-config.d If things still don't work, please do report it here on on the BTS. [1] http://sources.debian.net/src/dahdi-tools/1:2.10.0.1-1/debian/README.Debian/ [2] http://git.asterisk.org/gitweb/?p=dahdi/tools.git;a=blob;f=hotplug/span_config.d/50-asterisk;hb=HEAD -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com
Bertrand LUPART - Linkeo.com
2016-Apr-18 16:25 UTC
[asterisk-users] Debian 8.4 : dahdi startup scripts ?
Hello,>> I just made a asterisk / dahdi fresh install on Debian 8.4, and ended up with the following packages :[?]>> However, i can't find any dahdi startup script, neither init.d neither systemd fashion. >> >> $ sudo dpkg -l|grep -Ei 'dahdi'|cut -d " " -f3 |xargs dpkg -L|grep -E 'init.d|system' >> /usr/share/doc/dahdi/examples/system.conf.sample.gz >> /etc/init.d >> >> >> Am I missing something? > > Yes. README.Debian[1], included as /usr/share/doc/dahdi/README.debian . > > README.Debian (.gz, if it's long enough) is a file for some extra > documentation by the packager. See the section about "Automatic startup" > there. > > The only real use the DAHDI init script has is for interactive module > loading / unloading. Modprobe is not useful on its own, as DAHDI > includes a set of modules (especially if you use Astribanks. There a bit > of extra magic besides the recursive rmmod was added). > > Furthermore, there is really no point is removing of modules at system > shutdown. It only wastes time (and some CPU cycles, if you care about > power) and increases the chances of exposing bugs at that time.This startup / shutdown scheme apply to nominal cases where you don't need to reboot your system :) Building a brand new box may require you to restart dahdi a bunch of times : "no span" error [1], digium firmware not downloading [2], forgetting Europe requires E1 line mode, new telco uncertain if using crc4 ? More, in case your telco is failing, he'll often ask you to reset on your side first. Restarting dahdi feels way more convenient than rebooting a distant system. Red a bunch of READMEs of the packages installed before posting, not sure i red this one. Maybe a "Manual startup / shutdown" section would be welcome ;)> IIRC the Asterisk package in Jessie lacks the extra script to get the > configured DAHDI channels into Asterisk[2]. You may need to drop it > yourself to /usr/share/dahdi/span-config.d > > If things still don't work, please do report it here on on the BTS.This file is missing on my side (1:2.10.0.1-1), but asterisk seems to be aware of the channels. Not sure how. Thank you for your answer, [1] http://asteriskfaqs.org/2015/01/15/asterisk-users/dahdi_genconf-fails-with-empty-configuration-no-spans.html [2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820802#5 -- Bertrand LUPART