dahdi-tools/hotplug/span_config.d/50-asterisk
Tzafrir Cohen d1fb614ac8 hotplug: document asterisk scriptlet
A well-behaving distribution may choose not to install
span_config.d/50-asterisk as part of dahdi-tools, as it belongs in
asterisk. Still, it would be nice to be able to keep it as a documented
usage example. So just writ where this file needs to go and what it
does.

No other change: it is still installed by default.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2014-01-28 11:32:31 +02:00

15 lines
423 B
Bash
Executable File

#! /bin/sh
# 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.
if [ "$ACTION" != 'add' ]; then
# Nothing to do here
exit 0
fi
# Add to asterisk
asterisk -rx "dahdi create channels $BASECHAN $ENDCHAN"