2014-01-16 18:31:17 +08:00
|
|
|
#! /bin/sh
|
|
|
|
|
2014-01-28 17:32:31 +08:00
|
|
|
# This file, if installed under /usr/share/dahdi/span_config.d/ , will
|
|
|
|
# attempt to add a newly-generated span to a running copy of Asterisk.
|
|
|
|
# Asterisk has to be running (if not: it will pick the span on its
|
|
|
|
# startup), and has to have the channels already configured.
|
|
|
|
|
2014-01-16 18:31:17 +08:00
|
|
|
if [ "$ACTION" != 'add' ]; then
|
|
|
|
# Nothing to do here
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Add to asterisk
|
|
|
|
asterisk -rx "dahdi create channels $BASECHAN $ENDCHAN"
|