From c88eaa22e13bd4c092b367a28e57064659660466 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Thu, 2 Aug 2007 12:21:11 +0000 Subject: Merge xpp r4372: * Update to zaptel-1.2.18 and zaptel-1.4.3 (r4308 onward) * Fix a critical race with zaptel synchronization (r4362) * Added a /proc/xpp/cmds for statistics about command timing (r4360) * Fix a digit mapping bug with hardware dtmf detection (r4357) * In xpp/utils/Makefile add perl syntax checks to our scripts (r4337) * Better USB data error checking (r4336) * udev rules (xpp.rules) avoid false calls from wrong nodes (r4331) * Improve hardware detection and reporting in lszaptel, zaptel_hardware. zapconf is basically functional. * Leds are blinked synchronously on all Astribanks now (r4262) * Fix a BRI bug if OPTIMIZE_CHANMUTE was compiled into zaptel (r4258) (This feature was not yet accepted into official zaptel) * Removed compile warning about HZ != 1000 (r4218) * Firmware updates. * fpga_load now supports USB pathes without zeros (r4211) * XPD numbers have changed to '' (r4196) * Proper support for ZT_VMWI ioctl, if used in zaptel (r4092) * Fix FXO power denial detection (r4054) * FXO could accidentally go off-hook with some compilers (r4048) (From branches/1.2 r2732, r2735 - branches/1.4 2736) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2813 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- xpp/utils/zt_registration | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) (limited to 'xpp/utils/zt_registration') diff --git a/xpp/utils/zt_registration b/xpp/utils/zt_registration index d6d0278..9a8323f 100755 --- a/xpp/utils/zt_registration +++ b/xpp/utils/zt_registration @@ -8,7 +8,8 @@ # $Id$ # use strict; -BEGIN { my $dir = $0; $dir =~ s:/[^/]+$::; unshift(@INC, "$dir", "$dir/zconf"); } +use File::Basename; +BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/zconf"); } use Zaptel; use Zaptel::Span; @@ -73,7 +74,7 @@ zt_registration [on|off] =head1 DESCRIPTION -Without parameters, show all connected XPD's sorted by physical connector order. +Without parameters, show all connected XPDs sorted by physical connector order. Each one is show to be unregistered (off), or registered to a specific zaptel span (the span number is shown). @@ -84,3 +85,39 @@ All registerations/deregisterations are sorted by physical connector string. off -- deregisters all XPD's from zaptel. on -- registers all XPD's to zaptel. + +=head2 Sample Output + + $ zt_registration + XBUS-02 usb-0000:00:1d.7-3 + XBUS-02/XPD-00: on Span 9 + XBUS-02/XPD-10: on Span 10 + XBUS-02/XPD-20: on Span 11 + XBUS-02/XPD-30: on Span 12 + XBUS-01 usb-0000:00:1d.7-4 + XBUS-01/XPD-00: on Span 13 + XBUS-01/XPD-10: on Span 14 + XBUS-01/XPD-20: on Span 15 + XBUS-01/XPD-30: on Span 16 + XBUS-00 usb-0000:00:1d.7-5 + XBUS-00/XPD-00: on Span 17 + XBUS-00/XPD-10: on Span 18 + XBUS-00/XPD-20: on Span 19 + XBUS-00/XPD-30: on Span 20 + +=head1 FILES + +=over + +=item /proc/xpp/XBUS-nn/XPD-mm/zt_registration + +Reading from this file shows if if the if the specific XPD is +registered. Writing to it 0 or 1 registers / unregisters the device. + +This should allow you to register / unregister a specific XPD rather +than all of them. + +Unregistering an XPD will fail if the span is in use (has some channels +that are in use by e.g. Asterisk). + +=back -- cgit v1.2.3