[zaptel-commits] tzafrir: branch 1.2 r3555 - in /branches/1.2/xpp: ./ utils/ utils/zconf/ util...
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Mon Dec 24 15:24:51 CST 2007
Author: tzafrir
Date: Mon Dec 24 15:24:50 2007
New Revision: 3555
URL: http://svn.digium.com/view/zaptel?view=rev&rev=3555
Log:
* XppUtils.pm renamed Zaptel::Utils.pm .
* Some more documentation.
Added:
branches/1.2/xpp/utils/zconf/Zaptel/Utils.pm
- copied, changed from r3554, branches/1.2/xpp/utils/zconf/XppUtils.pm
Removed:
branches/1.2/xpp/utils/zconf/XppUtils.pm
Modified:
branches/1.2/xpp/.version
branches/1.2/xpp/Changelog_xpp
branches/1.2/xpp/README.Astribank
branches/1.2/xpp/utils/xpp_sync
branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm
branches/1.2/xpp/utils/zconf/Zaptel/Hardware/PCI.pm
branches/1.2/xpp/utils/zconf/Zaptel/Hardware/USB.pm
branches/1.2/xpp/utils/zconf/Zaptel/Span.pm
branches/1.2/xpp/utils/zconf/Zaptel/Xpp/Xbus.pm
branches/1.2/xpp/utils/zconf/Zaptel/Xpp/Xpd.pm
Modified: branches/1.2/xpp/.version
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/.version?view=diff&rev=3555&r1=3554&r2=3555
==============================================================================
--- branches/1.2/xpp/.version (original)
+++ branches/1.2/xpp/.version Mon Dec 24 15:24:50 2007
@@ -1,1 +1,1 @@
-trunk-r5157
+trunk-r5178
Modified: branches/1.2/xpp/Changelog_xpp
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/Changelog_xpp?view=diff&rev=3555&r1=3554&r2=3555
==============================================================================
--- branches/1.2/xpp/Changelog_xpp (original)
+++ branches/1.2/xpp/Changelog_xpp Mon Dec 24 15:24:50 2007
@@ -1,4 +1,4 @@
-Tue Dec 18 2007 Tzafrir Cohen <tzafrir.cohen at xorcom.com> - xpp.r5157
+Mon Dec 24 2007 Tzafrir Cohen <tzafrir.cohen at xorcom.com> - xpp.r5178
* xpd_pri: Basically ready.
* PCM synchronization changes:
- Each Astribank unit ticks independently. Each with its own PLL.
Modified: branches/1.2/xpp/README.Astribank
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/README.Astribank?view=diff&rev=3555&r1=3554&r2=3555
==============================================================================
--- branches/1.2/xpp/README.Astribank (original)
+++ branches/1.2/xpp/README.Astribank Mon Dec 24 15:24:50 2007
@@ -10,7 +10,7 @@
http://www.xorcom.com/documentation/manuals/[Astribank User Manual]
An HTML version of the latest version of this document could be found at
-http://rapid.tzafrir.org.il/docs/README.Astribank.html[]
+http://zaptel.tzafrir.org.il/README.Astribank.html[]
Building and Installation
-------------------------
@@ -365,7 +365,7 @@
* Check USB level status. You can use one of the following utilities for it:
- zaptel_hardware
+ zaptel_hardware -v
or
lsusb | grep e4e4
@@ -376,7 +376,7 @@
is loaded while the lsusb will just list the device.
- If it shows something as product ID *11x0* - the USB firmware is not
loaded. Maybe you need to run fxload. Or maybe just unplug and plug again
- the device.
+ the device. Also make sure that you have fxload installed.
- If lsusb shows the Product ID as *11x1* - only the USB firmware is loaded
and not the FPGA firmware is loaded. If this is still the case after
a while - either the firmware loading has failed or you don't have
@@ -495,7 +495,7 @@
(which means that Asterisk is driving the port).
-DEVICE STARTUP
+Device Startup
~~~~~~~~~~~~~~
This section describes in great depth the initialization of the Xorcom
Astribank. Normally it would not be really needed, as the standard
@@ -716,6 +716,20 @@
of an FXS XPD may take a few seconds.
+Astribank in Sysfs
+^^^^^^^^^^^^^^^^^^
+When an Astribank device loads it generates a device node in the bus
+'astribanks' in sysfs. You can see a directory for each device under
+/sys/bus/astribanks/devices/ and under it there are several attributes
+for each Astribank (such as its connector string).
+
+On each time an Astribank is initialized or destroyed a udev event is
+generated. The rules from our sample udev rules file (xpp/utils/xpp.rules)
+make that event run the script /usr/share/zaptel/astribank_hook with the
+parameter 'add' or 'remove'. Currently this script will just adjust the
+Astribank sync settings (by running xpp_sync).
+
+
Registering in Zaptel
^^^^^^^^^^^^^^^^^^^^^
The XPDs will not automatically register as zaptel spans. This is
@@ -788,6 +802,7 @@
(Note that the details of this interface are still potentially subject to
changes)
+
/proc/xpp/xbuses
^^^^^^^^^^^^^^^^
File /proc/xpp/xbuses lists the connected Astribank devices (one line
@@ -796,6 +811,7 @@
A device is normally has status "connected". The status "missing" means that
the device has been disconnected, but Asterisk still holds channels from it
open.
+
/proc/xpp/sync
^^^^^^^^^^^^^^
Modified: branches/1.2/xpp/utils/xpp_sync
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/xpp_sync?view=diff&rev=3555&r1=3554&r2=3555
==============================================================================
--- branches/1.2/xpp/utils/xpp_sync (original)
+++ branches/1.2/xpp/utils/xpp_sync Mon Dec 24 15:24:50 2007
@@ -17,7 +17,20 @@
my $sync;
my $autoselect;
+sub usage() {
+ print
+ "$0: show / set Astribank sync source\n".
+ "\n".
+ "Usage: $0 Show sync source.\n".
+ " $0 <auto|NN|zaptel> Set sync source.\n".
+ "";
+}
+
if(@ARGV == 1) {
+ if ($ARGV[0] =~ /^(-h|--help|help)$/) {
+ usage;
+ exit(0);
+ }
$sync = shift;
$autoselect = 1 if $sync =~ /^auto$/i;
}
@@ -142,7 +155,7 @@
=head1 SYNOPSIS
-xpp_sync [auto|host|nn]
+xpp_sync [auto|zaptel|nn]
=head1 DESCRIPTION
@@ -164,11 +177,17 @@
Automatically selects the best Astribank for syncing.
+=item zaptel
+
+Gets synchronization from the Zaptel sync master.
+
=item nn
-Set XBUS number nn as sync source.
+Sets XBUS-I<nn> as sync source.
=back
+
+(Parameter name is case-insensitive)
=head2 Example output:
@@ -188,6 +207,12 @@
it is the first on the list. It is also the actual syncer, as we can see
from the '+' beside it.
+xpp_sync is normally called from both the zaptel init.d script and the
+the Astribank udev script. The parameter it is called with defaults to
+I<auto>, but it is possible to override that parameter (e.g: set it to
+I<zaptel>) through the value of XPP_SYNC in either /etc/defualt/zaptel
+or /etc/sysconfig/zaptel .
+
=head1 FILES
=over
Modified: branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm?view=diff&rev=3555&r1=3554&r2=3555
==============================================================================
--- branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm (original)
+++ branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm Mon Dec 24 15:24:50 2007
@@ -8,7 +8,7 @@
# $Id$
#
use strict;
-use XppUtils;
+use Zaptel::Utils;
sub new($$$$$$) {
my $pack = shift or die "Wasn't called as a class method\n";
Modified: branches/1.2/xpp/utils/zconf/Zaptel/Hardware/PCI.pm
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/zconf/Zaptel/Hardware/PCI.pm?view=diff&rev=3555&r1=3554&r2=3555
==============================================================================
--- branches/1.2/xpp/utils/zconf/Zaptel/Hardware/PCI.pm (original)
+++ branches/1.2/xpp/utils/zconf/Zaptel/Hardware/PCI.pm Mon Dec 24 15:24:50 2007
@@ -8,7 +8,7 @@
# $Id$
#
use strict;
-use XppUtils;
+use Zaptel::Utils;
use Zaptel::Hardware;
our @ISA = qw(Zaptel::Hardware);
Modified: branches/1.2/xpp/utils/zconf/Zaptel/Hardware/USB.pm
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/zconf/Zaptel/Hardware/USB.pm?view=diff&rev=3555&r1=3554&r2=3555
==============================================================================
--- branches/1.2/xpp/utils/zconf/Zaptel/Hardware/USB.pm (original)
+++ branches/1.2/xpp/utils/zconf/Zaptel/Hardware/USB.pm Mon Dec 24 15:24:50 2007
@@ -8,7 +8,7 @@
# $Id$
#
use strict;
-use XppUtils;
+use Zaptel::Utils;
use Zaptel::Hardware;
use Zaptel::Xpp;
use Zaptel::Xpp::Xbus;
Modified: branches/1.2/xpp/utils/zconf/Zaptel/Span.pm
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/zconf/Zaptel/Span.pm?view=diff&rev=3555&r1=3554&r2=3555
==============================================================================
--- branches/1.2/xpp/utils/zconf/Zaptel/Span.pm (original)
+++ branches/1.2/xpp/utils/zconf/Zaptel/Span.pm Mon Dec 24 15:24:50 2007
@@ -8,7 +8,7 @@
# $Id$
#
use strict;
-use XppUtils;
+use Zaptel::Utils;
use Zaptel::Chans;
my $proc_base = "/proc/zaptel";
Copied: branches/1.2/xpp/utils/zconf/Zaptel/Utils.pm (from r3554, branches/1.2/xpp/utils/zconf/XppUtils.pm)
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/zconf/Zaptel/Utils.pm?view=diff&rev=3555&p1=branches/1.2/xpp/utils/zconf/XppUtils.pm&r1=3554&p2=branches/1.2/xpp/utils/zconf/Zaptel/Utils.pm&r2=3555
==============================================================================
--- branches/1.2/xpp/utils/zconf/XppUtils.pm (original)
+++ branches/1.2/xpp/utils/zconf/Zaptel/Utils.pm Mon Dec 24 15:24:50 2007
@@ -1,4 +1,4 @@
-package XppUtils;
+package Zaptel::Utils;
# Accessors (miniperl does not have Class:Accessor)
our $AUTOLOAD;
@@ -43,7 +43,7 @@
#
# Export symbols, but not by accident of inheritance.
#
- die "Sombody inherited XppUtils" if $pkg ne 'XppUtils';
+ die "Sombody inherited Zaptel::Utils" if $pkg ne 'Zaptel::Utils';
no strict 'refs';
*{ $callpkg . '::AUTOLOAD' } = \&AUTOLOAD;
*{ $callpkg . '::xpp_dump' } = \&xpp_dump;
Modified: branches/1.2/xpp/utils/zconf/Zaptel/Xpp/Xbus.pm
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/zconf/Zaptel/Xpp/Xbus.pm?view=diff&rev=3555&r1=3554&r2=3555
==============================================================================
--- branches/1.2/xpp/utils/zconf/Zaptel/Xpp/Xbus.pm (original)
+++ branches/1.2/xpp/utils/zconf/Zaptel/Xpp/Xbus.pm Mon Dec 24 15:24:50 2007
@@ -8,7 +8,7 @@
# $Id$
#
use strict;
-use XppUtils;
+use Zaptel::Utils;
use Zaptel::Xpp::Xpd;
my $proc_base = "/proc/xpp";
Modified: branches/1.2/xpp/utils/zconf/Zaptel/Xpp/Xpd.pm
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/zconf/Zaptel/Xpp/Xpd.pm?view=diff&rev=3555&r1=3554&r2=3555
==============================================================================
--- branches/1.2/xpp/utils/zconf/Zaptel/Xpp/Xpd.pm (original)
+++ branches/1.2/xpp/utils/zconf/Zaptel/Xpp/Xpd.pm Mon Dec 24 15:24:50 2007
@@ -8,7 +8,7 @@
# $Id$
#
use strict;
-use XppUtils;
+use Zaptel::Utils;
my $proc_base = "/proc/xpp";
More information about the zaptel-commits
mailing list