mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
contrib/scripts/autosupport: Update for Asterisk 13
This patch adds some minor tweaks for autosupport to update it for Asterisk 13.
This includes:
* Finally removing most references to Zaptel
* Adding support for some additional 'core' commands, and fixing nomenclature
that generally hasn't been used for some time
* Adding some PJSIP/SIP commands to gather endpoints/peers and active channels
Change-Id: Ic997b418cbd9313588b6608e50f47b0ce6f4f1f1
(cherry picked from commit 9fc9777fa3
)
This commit is contained in:
@@ -74,7 +74,7 @@ if [ $MYUID -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
SUPPORTED_MODULES="wcb4xxp wct4xxp wctc4xxp wctdm wctdm24xxp wcte11xp wcte12xp"
|
SUPPORTED_MODULES="wcb4xxp wct4xxp wctc4xxp wctdm wctdm24xxp wcte11xp wcte12xp"
|
||||||
RELATED_MODULES="$SUPPORTED_MODULES dahdi_dummy dahdi_transcode dahdi_vpmadt032_loader zaptel ztdummy zttranscode";
|
RELATED_MODULES="$SUPPORTED_MODULES dahdi_dummy dahdi_transcode dahdi_vpmadt032_loader";
|
||||||
|
|
||||||
OUTPUT_FILE="${FILE_PREFIX}${OUTPUT_FILE}"
|
OUTPUT_FILE="${FILE_PREFIX}${OUTPUT_FILE}"
|
||||||
TARBALL_OUTPUT_FILE="${FILE_PREFIX}${TARBALL_OUTPUT_FILE}"
|
TARBALL_OUTPUT_FILE="${FILE_PREFIX}${TARBALL_OUTPUT_FILE}"
|
||||||
@@ -152,18 +152,16 @@ echo >> $OUTPUT;
|
|||||||
echo >> $OUTPUT;
|
echo >> $OUTPUT;
|
||||||
echo -n "."
|
echo -n "."
|
||||||
|
|
||||||
# Check for loaded Zaptel/DAHDI modules
|
|
||||||
for module in dahdi zaptel; do
|
if [ -d /sys/module/dahdi ]; then
|
||||||
if [ -d /sys/module/$module ]; then
|
|
||||||
echo "------------------" >> $OUTPUT
|
echo "------------------" >> $OUTPUT
|
||||||
echo "$module version:" >> $OUTPUT
|
echo "dahdi version:" >> $OUTPUT
|
||||||
echo "------------------" >> $OUTPUT
|
echo "------------------" >> $OUTPUT
|
||||||
echo "/sys/module/$module/version: " >> $OUTPUT
|
echo "/sys/module/dahdi/version: " >> $OUTPUT
|
||||||
cat /sys/module/$module/version 2> /dev/null >> $OUTPUT
|
cat /sys/module/dahdi/version 2> /dev/null >> $OUTPUT
|
||||||
echo "" >> $OUTPUT;
|
echo "" >> $OUTPUT;
|
||||||
echo -n "."
|
echo -n "."
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
|
|
||||||
echo "------------------" >> $OUTPUT;
|
echo "------------------" >> $OUTPUT;
|
||||||
echo "DAHDI TOOLS : dahdi_cfg --help" >> $OUTPUT;
|
echo "DAHDI TOOLS : dahdi_cfg --help" >> $OUTPUT;
|
||||||
@@ -188,13 +186,16 @@ asterisk -V >> $OUTPUT;
|
|||||||
echo >> $OUTPUT;
|
echo >> $OUTPUT;
|
||||||
# Add check to see if asterisk is running.
|
# Add check to see if asterisk is running.
|
||||||
if [ -e /var/run/asterisk.ctl ] || [ -e /var/run/asterisk/asterisk.ctl ]; then
|
if [ -e /var/run/asterisk.ctl ] || [ -e /var/run/asterisk/asterisk.ctl ]; then
|
||||||
for command in "show version" "core show version" "pri show version" "dahdi show version" "transcoder show" \
|
for command in "core show version" "pri show version" "dahdi show version" "core show translation" \
|
||||||
"core show uptime" "pri show spans" "misdn show stacks" "zap show channels" "dahdi show status" "dahdi show channels" \
|
"core show uptime" "core show settings" "core show sysinfo" "core show channels" \
|
||||||
"dahdi show channel 1" "core show channels" "skype show version" "skype show licenses" "skype show users" \
|
"pri show spans" "dahdi show status" "dahdi show channels" "dahdi show channel 1" \
|
||||||
"skype show hostid" "show g729" "g729 show version" "g729 show licenses" "g729 show hostid" "fax show version" \
|
"pjsip show endpoints" "pjsip show registrations" "pjsip list channels" \
|
||||||
"fax show licenses" "fax show hostid" "fax show stats" "digium_phones show version" "digium_phones show alerts" \
|
"sip show peers" "sip show registry" "sip show channels" "sip show subscriptions" "sip show settings" \
|
||||||
"digium_phones show applications" "digium_phones show firmwares" "digium_phones show lines" "digium_phones show networks" \
|
"show g729" "g729 show version" "g729 show licenses" "g729 show hostid" \
|
||||||
"digium_phones show phones" "digium_phones show sessions" "digium_phones show settings" "digium_phones show translations" ;
|
"digium_phones show version" "digium_phones show alerts" "digium_phones show applications" \
|
||||||
|
"digium_phones show firmwares" "digium_phones show lines" "digium_phones show networks" \
|
||||||
|
"digium_phones show phones" "digium_phones show sessions" "digium_phones show settings" \
|
||||||
|
"digium_phones show translations" ;
|
||||||
do
|
do
|
||||||
echo "asterisk -rx \"$command\"" >> $OUTPUT;
|
echo "asterisk -rx \"$command\"" >> $OUTPUT;
|
||||||
asterisk -rx "$command" >> $OUTPUT;
|
asterisk -rx "$command" >> $OUTPUT;
|
||||||
@@ -317,19 +318,17 @@ echo >> $OUTPUT;
|
|||||||
echo -n "."
|
echo -n "."
|
||||||
|
|
||||||
echo "----------------------------" >> $OUTPUT;
|
echo "----------------------------" >> $OUTPUT;
|
||||||
echo "CAT OF DAHDI/ZAPTEL CHANNELS : cat /proc/dahdi/" >> $OUTPUT;
|
echo "CAT OF DAHDI CHANNELS : cat /proc/dahdi/" >> $OUTPUT;
|
||||||
echo "----------------------------" >> $OUTPUT;
|
echo "----------------------------" >> $OUTPUT;
|
||||||
for tech in dahdi zaptel zap; do
|
if [ -d /proc/dahdi/ ]; then
|
||||||
if [ -d /proc/$tech/ ]; then
|
for file in $(ls /proc/dahdi/ 2> /dev/null); do
|
||||||
for file in $(ls /proc/$tech/ 2> /dev/null); do
|
|
||||||
echo "----------------------------" >> $OUTPUT;
|
echo "----------------------------" >> $OUTPUT;
|
||||||
echo "/proc/$tech/$file:" >> $OUTPUT;
|
echo "/proc/dahdi/$file:" >> $OUTPUT;
|
||||||
cat /proc/$tech/$file >> $OUTPUT;
|
cat /proc/dahdi/$file >> $OUTPUT;
|
||||||
echo >> $OUTPUT;
|
echo >> $OUTPUT;
|
||||||
echo -n "."
|
echo -n "."
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
echo >> $OUTPUT;
|
echo >> $OUTPUT;
|
||||||
|
|
||||||
echo "------------------" >> $OUTPUT;
|
echo "------------------" >> $OUTPUT;
|
||||||
@@ -371,7 +370,7 @@ for mod in $SUPPORTED_MODULES; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo "------------------------" >> $OUTPUT;
|
echo "------------------------" >> $OUTPUT;
|
||||||
echo "DAHDI/ZAPTEL MODULE INFO : modinfo" >> $OUTPUT;
|
echo "DAHDI MODULE INFO : modinfo" >> $OUTPUT;
|
||||||
echo "------------------------" >> $OUTPUT;
|
echo "------------------------" >> $OUTPUT;
|
||||||
for file in $(ls /lib/modules/$(uname -r)/dahdi/*.ko \
|
for file in $(ls /lib/modules/$(uname -r)/dahdi/*.ko \
|
||||||
/lib/modules/$(uname -r)/dahdi/*/*.ko\
|
/lib/modules/$(uname -r)/dahdi/*/*.ko\
|
||||||
@@ -518,26 +517,9 @@ collect_config_backup()
|
|||||||
TAR_FILES="$TAR_FILES /etc/dahdi*"
|
TAR_FILES="$TAR_FILES /etc/dahdi*"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for Zaptel Module configuration
|
# Grab the dahdi init scripts, in case they have been modified
|
||||||
if [ -f /etc/sysconfig/zaptel ]; then
|
if [ -f /etc/init.d/dahdi ]; then
|
||||||
TAR_FILES="$TAR_FILES /etc/sysconfig/zaptel*"
|
TAR_FILES="$TAR_FILES /etc/init.d/dahdi"
|
||||||
fi
|
|
||||||
|
|
||||||
# Check for Zaptel Module configuration (alternate location)
|
|
||||||
if [ -f /etc/default/zaptel ]; then
|
|
||||||
TAR_FILES="$TAR_FILES /etc/default/zaptel*"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Grab the dahdi/zaptel init scripts, in case they have been modified
|
|
||||||
for driver in dahdi zaptel; do
|
|
||||||
if [ -f /etc/init.d/$driver ]; then
|
|
||||||
TAR_FILES="$TAR_FILES /etc/init.d/$driver"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Check for zaptel.conf
|
|
||||||
if [ -f /etc/zaptel.conf ]; then
|
|
||||||
TAR_FILES="$TAR_FILES /etc/zaptel*"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for fxotune.conf
|
# Check for fxotune.conf
|
||||||
@@ -567,6 +549,9 @@ collect_config_backup()
|
|||||||
if [ -f /var/log/messages ]; then
|
if [ -f /var/log/messages ]; then
|
||||||
TAR_FILES="$TAR_FILES /var/log/messages"
|
TAR_FILES="$TAR_FILES /var/log/messages"
|
||||||
fi
|
fi
|
||||||
|
if [ -f /var/log/syslog ]; then
|
||||||
|
TAR_FILES="$TAR_FILES /var/log/syslog"
|
||||||
|
fi
|
||||||
|
|
||||||
[ -f $TARBALL_OUTPUT ] && rm -rf $TARBALL_OUTPUT
|
[ -f $TARBALL_OUTPUT ] && rm -rf $TARBALL_OUTPUT
|
||||||
[ -f $TARBALL_OUTPUT.gz ] && rm -rf $TARBALL_OUTPUT.gz
|
[ -f $TARBALL_OUTPUT.gz ] && rm -rf $TARBALL_OUTPUT.gz
|
||||||
@@ -616,8 +601,8 @@ else
|
|||||||
echo "pci listing, dmesg, running processes, and kernel version"
|
echo "pci listing, dmesg, running processes, and kernel version"
|
||||||
echo
|
echo
|
||||||
echo "2. A backup of elements of your configuration such as:"
|
echo "2. A backup of elements of your configuration such as:"
|
||||||
echo "asterisk config files, license files, loaded dahdi/zaptel module"
|
echo "asterisk config files, license files, loaded dahdi module"
|
||||||
echo "parameters, and other asterisk/dahdi/zaptel related files."
|
echo "parameters, and other asterisk/dahdi related files."
|
||||||
echo
|
echo
|
||||||
echo "Collect this information [y/n] ? "
|
echo "Collect this information [y/n] ? "
|
||||||
read files;
|
read files;
|
||||||
|
Reference in New Issue
Block a user