mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
dahdi_span_config_hook: automatically register new dahdi channels
Install a hook script for DAHDI to register new spans with Asterisk automatically by running: asterisk -rx 'dahdi create channel FIRST LAST' Review: https://reviewboard.asterisk.org/r/3157/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
32
contrib/scripts/dahdi_span_config_hook
Executable file
32
contrib/scripts/dahdi_span_config_hook
Executable file
@@ -0,0 +1,32 @@
|
||||
#! /bin/sh
|
||||
|
||||
# This script is intended to be called from
|
||||
# /usr/share/dahdi/dahdi_span_config, which is is typically called from
|
||||
# a udev hook script.
|
||||
#
|
||||
# Environment is set in
|
||||
# http://git.asterisk.org/gitweb/?p=dahdi/tools.git;a=blob;f=hotplug/dahdi_span_config
|
||||
|
||||
if [ "$ACTION" != 'add' ]; then
|
||||
# Nothing to do here
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Add to asterisk
|
||||
asterisk -rx "dahdi create channels $BASECHAN $ENDCHAN"
|
||||
#! /bin/sh
|
||||
|
||||
# This script is intended to be called from
|
||||
# /usr/share/dahdi/dahdi_span_config, which is is typically called from
|
||||
# a udev hook script.
|
||||
#
|
||||
# Environment is set in
|
||||
# http://git.asterisk.org/gitweb/?p=dahdi/tools.git;a=blob;f=hotplug/dahdi_span_config
|
||||
|
||||
if [ "$ACTION" != 'add' ]; then
|
||||
# Nothing to do here
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Add to asterisk
|
||||
asterisk -rx "dahdi create channels $BASECHAN $ENDCHAN"
|
Reference in New Issue
Block a user