Compare commits
3 Commits
v2.5.0
...
v2.5.0-rc1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af450131a7 | ||
|
|
02087debe2 | ||
|
|
2e769eb00d |
37
ChangeLog
37
ChangeLog
@@ -1,40 +1,3 @@
|
||||
2011-08-05 Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* dahdi-tools version 2.5.0 released.
|
||||
|
||||
2011-08-02 17:28 +0000 [r10085-10087] Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* README: Extra README fixes: 'th' and ztcfg Signed-off-by: Tzafrir
|
||||
Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* README: spelling: ocnfig.status and such Signed-off-by: Tzafrir
|
||||
Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
2011-07-21 Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* dahdi-tools version 2.5.0-rc2 released.
|
||||
|
||||
2011-07-21 17:29 +0000 [r10071] Russ Meyerriecks <rmeyerreicks@digium.com>
|
||||
|
||||
* patlooptest.c: patlooptest: Ignore the first buffered event Fixes
|
||||
the feature introduced in r9909 that allows patlooptest to
|
||||
monitor channel events. Patlooptest was reporting events that we
|
||||
don't care about, prior to reading from the channel. This fix
|
||||
ignore the first event read on a channel and reports all
|
||||
subsequent events properly. Signed-off-by: Russ Meyerriecks
|
||||
<rmeyerriecks@digium.com>
|
||||
|
||||
2011-07-21 13:40 +0000 [r10068] Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* xpp/astribank_hook: astribank_hook: startup lock and more *
|
||||
Silently exit right away if user did not set XPP_HOTPLUG_DAHDI. *
|
||||
Only one Astribank should be allowed to run the startup script: -
|
||||
Protect that section with a "lock" (symlinking a file). - Sadly
|
||||
we can't rely on /run and may have to wait for a r/w file-system.
|
||||
- And thus even this waiting needs to be run in the background as
|
||||
to not hold udev. Signed-off-by: Tzafrir Cohen
|
||||
<tzafrir.cohen@xorcom.com>
|
||||
|
||||
2011-07-12 Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* dahdi-tools version 2.5.0-rc1 released.
|
||||
|
||||
30
README
30
README
@@ -4,7 +4,7 @@ Asterisk Development Team <asteriskteam@digium.com>
|
||||
$Revision$, $Date$
|
||||
|
||||
DAHDI stands for Digium Asterisk Hardware Device Interface. This
|
||||
package contains the user-space tools to configure the kernel modules
|
||||
package contains the userspace tools to configure the kernel modules
|
||||
included in the package dahdi-linux.
|
||||
|
||||
Build Requirements
|
||||
@@ -14,7 +14,7 @@ dahdi-linux before building dahdi-tools.
|
||||
|
||||
Build System
|
||||
~~~~~~~~~~~~
|
||||
GCC and friends. Generally you will need to install the package gcc.
|
||||
gcc and friends. Generally you will need to install the package gcc.
|
||||
There may be cases where you will need a specific version of gcc to build
|
||||
kernel modules.
|
||||
|
||||
@@ -51,7 +51,7 @@ There are some make targets that are provided to build or install just
|
||||
parts of DAHDI:
|
||||
|
||||
. Build targets:
|
||||
- make: Build DAHDI user-space programs. partial
|
||||
- make: Build DAHDI userspace programs. partial
|
||||
targets of it:
|
||||
* make 'utilname': builds 'utilname' alone (e.g: `make dahdi_diag`)
|
||||
* make utils: Build libtonezone.
|
||||
@@ -66,7 +66,7 @@ Installation to a Subtree
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
The following may be useful when testing the package or when preparing a
|
||||
package for a binary distribution (such as an rpm package) installing
|
||||
onto a subtree rather than on the real system.
|
||||
onto a subtree rather than on th real system.
|
||||
|
||||
make install DESTDIR=targetdir
|
||||
|
||||
@@ -89,7 +89,7 @@ run, use:
|
||||
To re-run ./configure with the same parameters it was run with last
|
||||
time, use:
|
||||
|
||||
./config.status --recheck
|
||||
./ocnfig.status --recheck
|
||||
|
||||
|
||||
Configuration
|
||||
@@ -138,7 +138,7 @@ include::genconf_parameters.asciidoc[]
|
||||
Tonezones
|
||||
~~~~~~~~~
|
||||
The file zonedata.c contains the information about the tone zones used
|
||||
in libtonezone (and hence also in dahdi_cfg). Here is a list of those zones:
|
||||
in libtonezone (and hence also in ztcfg). Here is a list of those zones:
|
||||
|
||||
include::tonezones.txt[]
|
||||
|
||||
@@ -146,14 +146,14 @@ include::tonezones.txt[]
|
||||
DAHDI PERL modules
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
The directory xpp has, in addition to helper utilities for the
|
||||
Xorcom Astribank, a collection of PERL modules to provide information
|
||||
related to DAHDI. The PERL modules themselves are under xpp/perl_modules/ .
|
||||
Xorcom Astribank, a collection of perl modules to provide information
|
||||
related to DAHDI. The perl modules themselves are under xpp/perl_modules/ .
|
||||
In xpp/ there are several utilities that use those modules:
|
||||
- xpp-specific: dahdi_registration, xpp_sync, xpp_blink .
|
||||
- General: lsdahdi, dahdi_genconf, dahdi_hardware, dahdi_drivers
|
||||
|
||||
The DAHDI PERL modules will currently only be automatically installed if you
|
||||
happen to install the xpp directory. Those utilities require the PERL modules
|
||||
The DAHDI perl modules will currently only be automatically installed if you
|
||||
happen to install the xpp directory. Those utilities require the perl modules
|
||||
to be installed, however they will also look for them in the directory
|
||||
perl_modules, and thus can be run directly from the DAHDI source tree. For
|
||||
example:
|
||||
@@ -167,7 +167,7 @@ instance:
|
||||
perldoc ./xpp/lsdahdi
|
||||
|
||||
Some of them are specific for the Xorcom Astribank and described in its
|
||||
documentation. the others are:
|
||||
docuemntation. the others are:
|
||||
|
||||
lsdahdi::
|
||||
A somewhat glorified `cat /proc/dahdi/*`.
|
||||
@@ -176,9 +176,9 @@ dahdi_genconf::
|
||||
/etc/dahdi/genconf_parameters (replaces genzaptelconf as well).
|
||||
dahdi_drivers::
|
||||
A two-liner script (not installed by default) that simply returns the
|
||||
modules that should be modprobe-d on this system.
|
||||
modules that should be modprobed on this system.
|
||||
dahdi_hardware::
|
||||
Uses the information from SysFS and its own knowledge to show
|
||||
Uses the information from sysfs and its own knowledge to show
|
||||
what PCI/USB DAHDI hardware is connected and if it is currently used
|
||||
by a driver. Shows also some more information for Astribanks from
|
||||
/proc/xpp .
|
||||
@@ -186,8 +186,8 @@ dahdi_hardware::
|
||||
|
||||
PPP Support
|
||||
~~~~~~~~~~~
|
||||
DAHDI digital cards can provide data channels through PPP as
|
||||
point-to-point connections. This requires a plug-in to the PPP daemon
|
||||
DAHDI digital cards can provide data channels through ppp as
|
||||
point-to-point connections. This requires a plugin to the ppp daemon
|
||||
that is included in the ppp/ subdirectory. To install it:
|
||||
|
||||
1. Make sure you have the PPP source / headers installed. On Debian:
|
||||
|
||||
@@ -167,7 +167,6 @@ int main(int argc, char *argv[])
|
||||
char * device;
|
||||
int opt;
|
||||
int oldstyle_cmdline = 1;
|
||||
unsigned int event_count = 0;
|
||||
|
||||
/* Parse the command line arguments */
|
||||
while((opt = getopt(argc, argv, "b:s:t:r:v?h")) != -1) {
|
||||
@@ -249,14 +248,9 @@ int main(int argc, char *argv[])
|
||||
write_again:
|
||||
res = write(fd,outbuf,bs);
|
||||
if (res != bs) {
|
||||
if (ELAST == errno) {
|
||||
ioctl(fd, DAHDI_GETEVENT, &x);
|
||||
if (event_count > 0)
|
||||
printf("Event: %d\n", x);
|
||||
++event_count;
|
||||
} else {
|
||||
printf("W: Res is %d: %s\n", res, strerror(errno));
|
||||
}
|
||||
printf("W: Res is %d: %s\n", res, strerror(errno));
|
||||
ioctl(fd, DAHDI_GETEVENT, &x);
|
||||
printf("Event: %d\n", x);
|
||||
goto write_again;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,10 +27,6 @@ else
|
||||
dahdi_conf="/etc/dahdi"
|
||||
fi
|
||||
|
||||
if [ "$XPP_HOTPLUG_DAHDI" != yes ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export XPPORDER_CONF="$dahdi_conf/xpp_order"
|
||||
if [ ! -r "$XPPORDER_CONF" ]; then
|
||||
(
|
||||
@@ -66,24 +62,26 @@ matched_devices() {
|
||||
|
||||
NUM_WANTED=`clean_lines | sed '/^$/d' | wc -l`
|
||||
NUM_GOOD=`matched_devices | wc -l`
|
||||
LOCK="/var/lock/twinstar_startup"
|
||||
|
||||
start_dahdi() {
|
||||
script=/etc/init.d/dahdi
|
||||
echo "Starting $script."
|
||||
"$script" start | logger -i -t "$script"
|
||||
status=$?
|
||||
echo "Status($script): $status"
|
||||
if [ "$XPP_HOTPLUG_DAHDI" = yes ]; then
|
||||
echo "Starting $script."
|
||||
"$script" start | logger -i -t "$script"
|
||||
status=$?
|
||||
echo "Status($script): $status"
|
||||
else
|
||||
echo "$0: Skip($script): No XPP_HOTPLUG_DAHDI=yes in /etc/dahdi/init.conf"
|
||||
exit 0
|
||||
fi
|
||||
if [ -x "$dir/twinstar_hook" ]; then
|
||||
"$dir/twinstar_hook"
|
||||
fi
|
||||
# Finished astribanks
|
||||
echo "Removing semaphore"
|
||||
astribank_is_starting -v -r
|
||||
rm -f "$LOCK"
|
||||
}
|
||||
|
||||
#echo "$0: $ACTION($XBUS_NAME)" | $LOGGER
|
||||
case "$ACTION" in
|
||||
add)
|
||||
;;
|
||||
@@ -92,28 +90,9 @@ remove)
|
||||
online)
|
||||
echo "$ACTION($XBUS_NAME): $NUM_GOOD/$NUM_WANTED from $XPPORDER_CONF" | $LOGGER
|
||||
if [ "$NUM_GOOD" -eq "$NUM_WANTED" ]; then
|
||||
(
|
||||
# Delay the initialization of the Astribank until the filesystem
|
||||
# is mounted read-write:
|
||||
test_file="/var/lock/astribank_test_file"
|
||||
for i in `seq 1 20`; do
|
||||
if touch $test_file 2> /dev/null; then
|
||||
rm -f $test_file
|
||||
break
|
||||
else
|
||||
echo "$0: [$i] - Failed writing '$test_file'...waiting" | $LOGGER
|
||||
sleep 1;
|
||||
fi
|
||||
done
|
||||
|
||||
if ln -s "$XBUS_NAME" "$LOCK"; then
|
||||
echo "START-DAHDI: Total $NUM_GOOD online." | $LOGGER
|
||||
# Fork services
|
||||
start_dahdi < /dev/null 2>&1 | $LOGGER
|
||||
else
|
||||
echo "$0: Was started: $(ls -l $LOCK)" | $LOGGER
|
||||
fi
|
||||
) < /dev/null 2>&1 | $LOGGER &
|
||||
echo "START-DAHDI: Total $NUM_GOOD online." | $LOGGER
|
||||
# Fork services
|
||||
start_dahdi < /dev/null 2>&1 | $LOGGER &
|
||||
fi
|
||||
;;
|
||||
offline)
|
||||
@@ -121,9 +100,8 @@ offline)
|
||||
if [ "$NUM_GOOD" -eq 0 ]; then
|
||||
echo "All Astribanks offline" | $LOGGER
|
||||
if [ -x "$dir/twinstar_hook" ]; then
|
||||
"$dir/twinstar_hook" || :
|
||||
"$dir/twinstar_hook"
|
||||
fi
|
||||
rm -f "$LOCK"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user