Page 1 of 1

Dahdi file missing after reboot

PostPosted: Tue Jun 12, 2018 2:46 am
by susam
Hello,
I am using vicibox 8.0.1, I have installed sangoma card through wancfg_dahdi command, but I am facing some issue after each time server reboot or service vicidial restart, dahdi is missing, each time I have to configure the card after reboot. I have faced this issue several times on different types of server.

Re: Dahdi file missing after reboot

PostPosted: Thu Jun 20, 2019 1:46 am
by williamconley
susam wrote:Hello,
I am using vicibox 8.0.1, I have installed sangoma card through wancfg_dahdi command, but I am facing some issue after each time server reboot or service vicidial restart, dahdi is missing, each time I have to configure the card after reboot. I have faced this issue several times on different types of server.


define "dahdi is missing". I doubt that it has been uninstalled, but it is possible the driver does not automatically load.

In other words, you may merely need to initialize the dahdi driver instead of "configure the card".

Was the card installed before you installed Vicibox on the server? The installation script ordinarily checks for sangoma/dahdi devices and writes scripts that load the appropriate drivers during boot.

What steps, precisely, do you take to "configure the card" after reboot? (which commands, line for line)

Re: Dahdi file missing after reboot

PostPosted: Fri Jul 12, 2019 3:43 pm
by thephaseusa
I have a couple of servers that seemed to be happening on, so as a workaround I added
modprobe dahdi
systemctl start dahdi

Into the file /etc/rc.d/after.local

John M

Re: Dahdi file missing after reboot

PostPosted: Mon Jun 15, 2020 12:10 am
by susam
I have done the same, but no result. each time after reboot server I have to configure wancfg_dahdi, if not in asterisk -rvv when I run dahdi show status , dahdi not found. here is the file as you suggest. I am using vici 8.0.1, and sangoma PRI card.


vicibox8:~ # vi /etc/rc.d/after.local
#! /bin/sh
#
# Copyright (c) 2010 SuSE LINUX Products GmbH, Germany. All rights reserved.
#
# Author: Werner Fink, 2010
#
# /etc/init.d/after.local
#
# script with local commands to be executed from init after all scripts
# of a runlevel have been executed.
#
# Here you should add things, that should happen directly after
# runlevel has been reached.
#


sleep 3
chvt 1
modprobe dahdi
systemctl start dahdi

Re: Dahdi file missing after reboot

PostPosted: Mon Jun 15, 2020 6:29 am
by carpenox
Try these steps below:

Code: Select all

nano /etc/systemd/system/dahdi.service

###copy paste this into the file until i say stop####

[Unit]
 Description=/etc/dahdi Compatibility
 ConditionPathExists=/etc/dahdi

[Service]
 Type=forking
 ExecStart=/etc/dahdi start
 TimeoutSec=0
 StandardOutput=tty
 RemainAfterExit=yes
 SysVStartPriority=99

[Install]
 WantedBy=multi-user.target

########STOP#######


####Now lets create the file: dahdi
nano /etc/dahdi

######Copy and paste below here until i say stop#####

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local


### load dahdi drivers
modprobe dahdi
/usr/sbin/dahdi_cfg -vvvvvvvvvvvvv


##########STOP########

chmod +x /etc/dahdi
systemctl enable dahdi; systemctl start dahdi

Re: Dahdi file missing after reboot

PostPosted: Wed Jun 17, 2020 12:03 am
by susam
nano /etc/dahdi this is a directory. I am unable to create file : dahdi

Re: Dahdi file missing after reboot

PostPosted: Wed Jun 17, 2020 7:34 am
by carpenox
alter it to dahdi-svc and change the location in the first file to ConditionPathExists=/etc/dahdi-svc and ExecStart=/etc/dahdi-svc start

and last - systemctl dahdi-svc enable and start

Re: Dahdi file missing after reboot

PostPosted: Wed Jun 17, 2020 9:12 am
by susam
Can you please explain or provide me the full procedure. Which one I have to alter, do you mean i need to rename the /etc/dahdi folder to dahdi-svc? If I am going change the name of folder. How to right this
"####Now lets create the file: dahdi
nano /etc/dahdi
######Copy and paste below here until i say stop#####

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

### load dahdi drivers
modprobe dahdi
/usr/sbin/dahdi_cfg -vvvvvvvvvvvvv
"

Re: Dahdi file missing after reboot

PostPosted: Thu Jun 18, 2020 12:13 am
by susam
I found this , might be this is the reason, can not load after server reboot or service vicidial restart
" Failed to locate boostrap directory
wanrouter boot scripts will not be installed"

Any suggestion

Re: Dahdi file missing after reboot

PostPosted: Thu Jun 18, 2020 12:19 am
by carpenox
first off, try this:

modprobe dahdi

then

dahdi_cfg -vvv

Re: Dahdi file missing after reboot

PostPosted: Thu Jun 18, 2020 11:17 pm
by susam
I have try but no result here is the out put.

DAHDI Tools Version - 2.11.1

DAHDI Version: 2.11.1
Echo Canceller(s):
Configuration
======================

SPAN 1: CCS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)
SPAN 2: CCS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)

Channel map:

Channel 01: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 04)
Channel 05: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 05)
Channel 06: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 06)
Channel 07: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 07)
Channel 08: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 08)
Channel 09: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 09)
Channel 10: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 10)
Channel 11: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 11)
Channel 12: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 12)
Channel 13: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 13)
Channel 14: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 14)
Channel 15: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 15)
Channel 16: Hardware assisted D-channel (Default) (Echo Canceler: none) (Slaves: 16)
Channel 17: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 17)
Channel 18: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 18)
Channel 19: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 19)
Channel 20: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 20)
Channel 21: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 21)
Channel 22: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 22)
Channel 23: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 23)
Channel 24: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 24)
Channel 25: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 25)
Channel 26: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 26)
Channel 27: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 27)
Channel 28: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 28)
Channel 29: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 29)
Channel 30: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 30)
Channel 31: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 31)
Channel 32: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 32)
Channel 33: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 33)
Channel 34: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 34)
Channel 35: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 35)
Channel 36: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 36)
Channel 37: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 37)
Channel 38: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 38)
Channel 39: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 39)
Channel 40: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 40)
Channel 41: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 41)
Channel 42: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 42)
Channel 43: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 43)
Channel 44: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 44)
Channel 45: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 45)
Channel 46: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 46)
Channel 47: Hardware assisted D-channel (Default) (Echo Canceler: none) (Slaves: 47)
Channel 48: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 48)
Channel 49: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 49)
Channel 50: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 50)
Channel 51: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 51)
Channel 52: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 52)
Channel 53: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 53)
Channel 54: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 54)
Channel 55: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 55)
Channel 56: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 56)
Channel 57: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 57)
Channel 58: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 58)
Channel 59: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 59)
Channel 60: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 60)
Channel 61: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 61)
Channel 62: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 62)

62 channels to configure.

DAHDI_SPANCONFIG failed on span 1: No such device or address (6)

Re: Dahdi file missing after reboot

PostPosted: Fri Jun 19, 2020 12:21 am
by carpenox
you need to reinstall dahdi

Re: Dahdi file missing after reboot

PostPosted: Fri Jun 19, 2020 1:42 am
by susam
So every day same I am facing. each day I have to configure sangoma card after reboot the server through wancfg_dahdi command and it is working fine after configure. And I am facing this issue for 16 client servers.
And after 8.0.1 version sangoma card is not working. So I think who ever use sangoma card they are facing same issue.

Re: Dahdi file missing after reboot

PostPosted: Fri Jun 19, 2020 7:01 am
by carpenox
ok so add that command to startup file such as rc.local

Re: Dahdi file missing after reboot

PostPosted: Fri Jun 19, 2020 1:20 pm
by williamconley
or add it to your crontab -e ... perhaps with a "sleep 10;" in front of it to be sure everything else has loaded.

instead of a specific time, use @reboot

eg: not "* * * * * sleep 10; /path/to/command" but "@reboot sleep 10; /path/to/command"

Re: Dahdi file missing after reboot

PostPosted: Fri Jun 26, 2020 11:12 am
by susam
williamconley wrote:or add it to your crontab -e ... perhaps with a "sleep 10;" in front of it to be sure everything else has loaded.

instead of a specific time, use @reboot

eg: not "* * * * * sleep 10; /path/to/command" but "@reboot sleep 10; /path/to/command"


Here is the logs file when I restart the server or vicidial service
-----------------------------------------------------------------------------
2020-06-26T21:39:33.528388+05:30 vicibox8 kernel: [65938.386460] wanpipe1: Shutting Down!
2020-06-26T21:39:33.528389+05:30 vicibox8 kernel: [65938.387852] wanpipe1: Unregister Wanpipe device from Zaptel!
2020-06-26T21:39:33.528390+05:30 vicibox8 kernel: [65938.387857] dahdi: disable_span: span 1
2020-06-26T21:39:33.528391+05:30 vicibox8 kernel: [65938.388599] wanpipe1: unregistering 'w1g1'
2020-06-26T21:39:33.528523+05:30 vicibox8 systemd-udevd[412]: Network interface NamePolicy= disabled by default.
2020-06-26T21:39:33.528711+05:30 vicibox8 irqd[721]: w1g1 ppp <pointopoint,noarp> group 0
2020-06-26T21:39:33.539380+05:30 vicibox8 'dahdi_span_config'[16735]: offline: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:04.0/wanpipe1/wanpipe_devices:wanpipe1/span-1
2020-06-26T21:39:33.543547+05:30 vicibox8 'dahdi_handle_device'[16743]: remove: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:04.0/wanpipe1/wanpipe_devices:wanpipe1
2020-06-26T21:39:33.544759+05:30 vicibox8 'dahdi_handle_device'[16745]: D: Running '/usr/share/dahdi/handle_device.d/10-span-types'
2020-06-26T21:39:33.545713+05:30 vicibox8 'dahdi_handle_device'[16745]: D: Running '/usr/share/dahdi/handle_device.d/20-span-assignments'
2020-06-26T21:39:33.555077+05:30 vicibox8 kernel: [65938.411328] wanpipe1: E1 Front End unconfigation!
2020-06-26T21:39:33.555090+05:30 vicibox8 kernel: [65938.411358] wanpipe1: AFT communications disabled! (Dev Cnt: 1 Cause: Device Down)
2020-06-26T21:39:33.555091+05:30 vicibox8 kernel: [65938.411368] wanpipe1: Unregisterd HWEC
2020-06-26T21:39:33.555092+05:30 vicibox8 kernel: [65938.411369] wanpipe1: Unregister interface from wanec1 (usage 1)!
2020-06-26T21:39:33.555093+05:30 vicibox8 kernel: [65938.411369] wanpipe1: Releasing EC device (force)!
2020-06-26T21:39:33.583036+05:30 vicibox8 kernel: [65938.442126] wanpipe1: Set Echo Canceller chip reset.
2020-06-26T21:39:33.583042+05:30 vicibox8 kernel: [65938.442142] wanpipe1: AFT communications disabled! (Dev Cnt: 1 Cause: Device Down)
2020-06-26T21:39:33.583044+05:30 vicibox8 kernel: [65938.442175] wanpipe1: TASKQ Not Running
2020-06-26T21:39:33.583045+05:30 vicibox8 kernel: [65938.442176] wanpipe1: Global Chip Shutdown Usage=1, Used_type_cnt=1
2020-06-26T21:39:33.583045+05:30 vicibox8 kernel: [65938.442177] wanpipe1: Global E1 Front End unconfigation!
2020-06-26T21:39:33.587049+05:30 vicibox8 kernel: [65938.444254] wanpipe1: Master shutting down
2020-06-26T21:39:33.591173+05:30 vicibox8 kernel: [65938.449877] af_wanpipe: Unregistering Wanpipe API Socket Module
2020-06-26T21:39:33.635146+05:30 vicibox8 kernel: [65938.491430] NET: Unregistered protocol family 25
2020-06-26T21:39:33.659130+05:30 vicibox8 kernel: [65938.515886] wanec_remove_dev: Unregistering Wanpipe ECDEV Device!
2020-06-26T21:39:33.659151+05:30 vicibox8 kernel: [65938.516091] WANEC Layer: Unloaded
2020-06-26T21:39:33.695119+05:30 vicibox8 kernel: [65938.554638] WANPIPE: TDM Codecs unloaded.
2020-06-26T21:39:33.699068+05:30 vicibox8 kernel: [65938.556121]
2020-06-26T21:39:33.699093+05:30 vicibox8 kernel: [65938.556125] wanpipe: WANPIPE Modules Unloaded.
2020-06-26T21:39:33.731590+05:30 vicibox8 kernel: [65938.588457] dahdi: Telephony Interface Unloaded
2020-06-26T21:39:33.823076+05:30 vicibox8 kernel: [65938.679579] usbcore: deregistering interface driver sdlausb
2020-06-26T21:39:33.852474+05:30 vicibox8 vicidial[16640]: Unloading wanrouter... done.
2020-06-26T21:39:33.859744+05:30 vicibox8 vicidial[16640]: DAHDI and modules not loaded, skipping.
2020-06-26T21:39:33.860296+05:30 vicibox8 vicidial[16640]: ViciDial Telephony server stopped. Log at /var/log/vicidial.log
2020-06-26T21:39:33.860727+05:30 vicibox8 vicidial[16640]: ..done
2020-06-26T21:39:33.862348+05:30 vicibox8 systemd[1]: Stopped LSB: ViciDial Telephony Server.
2020-06-26T21:39:33.907407+05:30 vicibox8 systemd[1]: Starting LSB: ViciDial Telephony Server...
2020-06-26T21:39:33.955930+05:30 vicibox8 vicidial[16811]: Starting ViciDial Telephony Server...
2020-06-26T21:39:33.969105+05:30 vicibox8 kernel: [65938.828726] dahdi: Version: 2.11.1
2020-06-26T21:39:33.969123+05:30 vicibox8 kernel: [65938.828867] dahdi: Telephony Interface Registered on major 196
2020-06-26T21:39:33.972236+05:30 vicibox8 vicidial[16811]: Loading dahdi_dummy module... failed.
2020-06-26T21:39:33.975110+05:30 vicibox8 vicidial[16811]: Fallback to dahdi module... done.
2020-06-26T21:39:38.978444+05:30 vicibox8 vicidial[16811]: Initializing DAHDI Hardware... done.
2020-06-26T21:39:39.014261+05:30 vicibox8 vicidial[16811]: Resetting vars and rolling logs... done.
2020-06-26T21:39:44.077938+05:30 vicibox8 vicidial[16811]: Starting Asterisk... PID 16875, done.
2020-06-26T21:39:44.078522+05:30 vicibox8 vicidial[16811]: Giving asterisk -1 process priority... done.
2020-06-26T21:39:44.082436+05:30 vicibox8 vicidial[16811]: Starting ip_relay with OS specific version... done.
2020-06-26T21:39:44.082581+05:30 vicibox8 vicidial[16811]: ViciDial Telephony Server Started. Log at /var/log/vicidial.log
2020-06-26T21:39:44.082647+05:30 vicibox8 vicidial[16811]: ..done
2020-06-26T21:39:44.082714+05:30 vicibox8 systemd[1]: Started LSB: ViciDial Telephony Server.
---------------------------------------------------------------------------------------------------------------

Re: Dahdi file missing after reboot

PostPosted: Mon Jun 29, 2020 9:58 pm
by carpenox
im not sure if this applies when using a wanpipe but what happens if you run: dahdi_cfg -vvv

Re: Dahdi file missing after reboot

PostPosted: Tue Jun 30, 2020 8:20 am
by susam
Got resolved, due to wanrouter it is showing error. I have start wanrouter and put "wanrouter start" on boot script , thanks everyone for support.

Re: Dahdi file missing after reboot

PostPosted: Tue Jun 30, 2020 8:51 am
by carpenox
good postback, glad u got it figured out