Displaying 1 result from an estimated 1 matches for "asterisk_nice_restart".
2009 Mar 19
2
Script to softly restart Asterisk each midnight to clean locked channels
.../cdr/etc/etc).
Script soft hangups all alive channels in dirty way then kills Asterisk and
starts it up.
Hope it will be useful to somebody.
Corrections/comments welcome.
#! /bin/sh
# Script to restart asterisk softly by Kolmisoft
# crontab
# 0 0 * * * /usr/local/mor/asterisk_nice_restart.sh
# tell Asterisk do not accept new calls
asterisk -rx 'stop gracefully' >/dev/null
# read all channels
asterisk -rx 'core show channels verbose' | sed '1d' > /tmp/f1
cat /tmp/f1 | awk '{split ($0,a," "); print a[11]}' > /tmp/f2...