sorry I forgot to post that I ran it like you said
The problem is here:
When you run dahdi_scan as the asterisk user, itās not returning anything.
All your problems are caused by this.
Thatās an issue with your machine, and is not how it works anywhere else. How exactly did you install this machine?
It started on my production machine on friday. I downloaded a fresh install of the distro from freepbx.org and installed it on a test server and replicated the issue
How exactly did you install this machine? You downloaded a file called (something) and then (did something)
download the ISO from http://downloads.freepbxdistro.org/ISO/FreePBX-64bit-10.13.66.iso
and burn the iso to a dvd then installed it onto a test HP Proliant Server
Thanks! So can you confirm that the error is what I said it is? That you can run ādahdi_scanā as root, but not as the asterisk user?
running them either as asterisk or root outputs the same thing
However I did figure out that dahdi does not start back up after I run a amportal restart
dahdi_scan is blank until I run service dahdi start
service dahdi status is blank until I run service dahdi start
service dahdi start
then dahdi_scan has output[1]
active=yes
alarms=RED
description=Wildcard TE131/TE133 Card 0
name=WCT13x/0
manufacturer=Digium
devicetype=Wildcard TE131/TE133 (VPMOCT032)
location=PCI Bus 23 Slot 01
basechan=1
totchans=24
irq=0
type=digital-T1
syncsrc=1
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=B8ZS,AMI
framing_opts=ESF,D4
coding=B8ZS
framing=ESF
However the spans are still not showing up
asterisk -rx āpri show spansā
output is still blank
ok so i ran some more test and found that when dahdi_scan does not return a output when i run service dahdi start then
module unload chan_dahdi.so
module load chan_dahdi.so
then there is a output for asterisk -rx āpri show spansā
everthing comes back up and works fine.
Here are the commands I ran and the ouputs.
Everything is working fine at this point
[root@cityhallpbx ~]# dahdi_scan
[1]
active=yes
alarms=OK
description=Wildcard TE131/TE133 Card 0
name=WCT13x/0
manufacturer=Digium
devicetype=Wildcard TE131/TE133 (VPMOCT032)
location=PCI Bus 10 Slot 01
basechan=1
totchans=24
irq=0
type=digital-T1
syncsrc=1
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=B8ZS,AMI
framing_opts=ESF,D4
coding=B8ZS
framing=ESF
[2]
active=yes
alarms=OK
description=Wildcard TE131/TE133 Card 1
name=WCT13x/1
manufacturer=Digium
devicetype=Wildcard TE131/TE133 (VPMOCT032)
location=PCI Bus 13 Slot 01
basechan=25
totchans=24
irq=0
type=digital-T1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=B8ZS,AMI
framing_opts=ESF,D4
coding=B8ZS
framing=ESF
[root@cityhallpbx ~]# asterisk -rx 'pri show spansā
PRI span 1/0: Up, Active
PRI span 2/0: Up, Active
**[root@cityhallpbx ~]# **amportal restart
Please waitā¦
!!!amportal is depreciated. Please use fwconsole!!!
forwarding all commands to 'fwconsoleā
Running FreePBX shutdownā¦
Restapps daemon stopped
XMPP Server Stopped
Stopping Zulu Server
Stopped Zulu Server
Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
Press C to Cancel
Press N to shut down NOW
[============================] 1 sec
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Stopping DAHDi for Digium Cards
DAHDi Stopped
Running VQPlus Hooks
Stopping Queue Callback Daemon
Queue Callback Daemon Stopped
Running FreePBX startupā¦
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
DAHDi: Already started
Running Sysadmin Hooks
Restarting fail2ban
fail2ban Restarted
Updating License Information for 26751820
Starting Asteriskā¦
[============================] 2 secs
Asterisk Started
Starting Restapps daemon
Running VQPlus Hooks
Starting Queue Callback Daemon
Queue Callback Daemon Started
Running XMPP Hooks
Starting XMPP Server
XMPP Server Started
Stopping fail2ban: [ OK ]
Ensuring logfiles are presentStarting fail2ban: [ OK ]
No Calls can be made at this point
[root@cityhallpbx ~]# dahdi_scan
[root@cityhallpbx ~]# asterisk -rx āpri show spansā
[root@cityhallpbx ~]# service dahdi status
[root@cityhallpbx ~]# service dahdi start
Loading DAHDI hardware modules:
wcte13xp: [ OK ]
wcte43x: [ OK ]
D: auto '/sys/bus/dahdi_devices/devices/pci:0000:0a:00.0ā
auto-assign /sys/bus/dahdi_devices/devices/pci:0000:0a:00.0
D: auto '/sys/bus/dahdi_devices/devices/pci:0000:0d:00.0ā
auto-assign /sys/bus/dahdi_devices/devices/pci:0000:0d:00.0
Running dahdi_cfg: [ OK ]
[root@cityhallpbx ~]# module load chan_dahdi.so
-bash: module: command not found
[root@cityhallpbx ~]# asterisk -r
Asterisk 13.9.1, Copyright Ā© 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer [email protected]
Asterisk comes with ABSOLUTELY NO WARRANTY; type ācore show warrantyā for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ācore show licenseā for details.
Connected to Asterisk 13.9.1 currently running on cityhallpbx (pid = 4300)
cityhallpbxCLI> module load chan_dahdi.so
Unable to load module chan_dahdi.so
Command āmodule load chan_dahdi.soā failed.
cityhallpbxCLI> module load chan_dahdi.so
Loaded chan_dahdi.so
cityhallpbx*CLI> exit
Asterisk cleanly ending (0).
Executing last minute cleanups
[root@cityhallpbx ~]# dahdi_scan
[1]
active=yes
alarms=OK
description=Wildcard TE131/TE133 Card 0
name=WCT13x/0
manufacturer=Digium
devicetype=Wildcard TE131/TE133 (VPMOCT032)
location=PCI Bus 10 Slot 01
basechan=1
totchans=24
irq=0
type=digital-T1
syncsrc=1
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=B8ZS,AMI
framing_opts=ESF,D4
coding=B8ZS
framing=ESF
[2]
active=yes
alarms=OK
description=Wildcard TE131/TE133 Card 1
name=WCT13x/1
manufacturer=Digium
devicetype=Wildcard TE131/TE133 (VPMOCT032)
location=PCI Bus 13 Slot 01
basechan=25
totchans=24
irq=0
type=digital-T1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=B8ZS,AMI
framing_opts=ESF,D4
coding=B8ZS
framing=ESF
[root@cityhallpbx ~]# asterisk -rx 'pri show spansā
PRI span 1/0: Up, Active
PRI span 2/0: Up, Active
[root@cityhallpbx ~]#
Everything is back up and running
From the output of amportal restart or fwconsole restart appears that dahdi is never started back up again
but the screen says it was started
[root@cityhallpbx ~]# amportal restart
Please waitā¦
!!!amportal is depreciated. Please use fwconsole!!!
forwarding all commands to 'fwconsoleā
Running FreePBX shutdownā¦
Restapps daemon stopped
XMPP Server Stopped
Stopping Zulu Server
Stopped Zulu Server
Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
Press C to Cancel
Press N to shut down NOW
[============================] 1 sec
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Stopping DAHDi for Digium Cards
DAHDi Stopped
Running VQPlus Hooks
Stopping Queue Callback Daemon
Queue Callback Daemon Stopped
Running FreePBX startupā¦
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
DAHDi: Already started
Running Sysadmin Hooks
Restarting fail2ban
fail2ban Restarted
Updating License Information for 26751820
Starting Asteriskā¦
[============================] 2 secs
Asterisk Started
Starting Restapps daemon
Running VQPlus Hooks
Starting Queue Callback Daemon
Queue Callback Daemon Started
Running XMPP Hooks
Starting XMPP Server
XMPP Server Started
Stopping fail2ban: [ OK ]
Ensuring logfiles are presentStarting fail2ban: [ OK ]
In summary running the commands
service dahdi start
asterisk -rx 'module unload chan_dahdi.soā
asterisk -rx āmodule load chan_dahdi.soā
fixes the issue on both test and production machines
The real issue is clear. On start the system thinks Dahdi is already started. Has nothing to do with asterisk modules.
Also as the warning clearly states. Stop using amportal.
Please do not open tickets on issues. Issues.freepbx.org is for reproducible issues. This still isnāt reproducible. Youāve got two developers in here. Opening a ticket on issues just further fragments the issue and distracts everyone involved. Iām not negating your issue but Iāve asked you to not open an issue on the bug tracker because then Iāll have to go through asking you all of the same information I asked here over the last 50 replies in this thread.
I agree with you 100% but in order for me to get it working again I have to run those commands.
and I know its a habit I have been trying to break that habit
OK Sorryā¦ So what do I do from hereā¦ I have reproducted the issue twice and two different machines. I have another box in production that I bet will do the same thing
So the shutdown sequence is as follows (technically):
service asterisk stop
/etc/init.d/dahdi stop
Then for startup
/etc/init.d/dahdi status
echo $?
If the above returns anything but 3 then āDAHDi: Already startedā. Else
/etc/init.d/dahdi start
service asterisk start
Try running the above manually. Specifically see what dahdi status returns when everything is āoffā
I ran the above commands and it always returns a status of 0
I even ran it when everything was working correctly and it still gave a status of 3
Sorry my wording was wrong.
/etc/init.d/dahdi status
echo $?
This will return ā3ā when Dahdi is NOT running.
Is that what you are seeing? If not what is dahdi status itself returning (without the echo $?)
No I see 0 no matter what running or not running
Then dahdi is never stopping. Seems like an issue with your system again. What happens when you run stop multiple times
dahdi is stopping because when i run service dahdi status I get nothing until i run service dahdi start
then I see output
If that is true then the response code from dahdi status would be ā3ā NOT ā0ā
[root@dahdidev1 ~]# /etc/init.d/dahdi status
[root@dahdidev1 ~]# echo $?
3
You also wouldnāt be able to load and unload the module within Asterisk if that were true.
When you stop dahdi then this directly is no longer present:
[root@dahdidev1 ~]# ls /proc/dahdi
ls: cannot access /proc/dahdi: No such file or directory
Thatās what returns the exit code of ā3ā
if [ -d /proc/dahdi ]; then
/usr/sbin/lsdahdi
RETVAL=0
else
RETVAL=3
fi
;;