| 1 | #! /bin/sh |
| 2 | |
| 3 | # This file, if installed under /usr/share/dahdi/span_config.d/ , will |
| 4 | # attempt to add a newly-generated span to a running copy of Asterisk. |
| 5 | # Asterisk has to be running (if not: it will pick the span on its |
| 6 | # startup), and has to have the channels already configured. |
| 7 | # |
| 8 | # Environment is set in |
| 9 | # http://git.asterisk.org/gitweb/?p=dahdi/tools.git;a=blob;f=hotplug/dahdi_span_config |
| 10 | |
| 11 | if [ "$ACTION" != 'add' ]; then |
| 12 | # Nothing to do here |
| 13 | exit 0 |
| 14 | fi |
| 15 | |
| 16 | # Add to asterisk |
| 17 | asterisk -rx "dahdi create channels $BASECHAN $ENDCHAN" |