Commit Graph

41 Commits

Author SHA1 Message Date
Russ Meyerriecks 855772135c wcb4xxp: Adds support for b43x/b23x products
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2015-10-26 16:51:50 -05:00
Oron Peled 66e2c3ba11
autotools: now "make distcheck" also works.
* Fix distcheck by having all the targets installed under $prefix
* But by default (no prefix or prefix=/usr), revert to older pathes:
  - /etc/dahdi
  - udev rules in /etc/udev/rules.d
  - perl in perl sitelib
  - man pages in /usr/share/man
* Add configure options:
  --with-udevrules= (e.g.: /lib/udev/rules.d)
  --with-perllib= (e.g.: `perl -V:vendorlib)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2015-05-26 13:57:36 +03:00
Oron Peled 0090086bce automake: handle "make dist"
* "make distcheck" still fails

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2015-05-19 19:54:11 +03:00
Oron Peled b054abb7e9 automake: xpp: man-pages and perl-scripts
* Now man-pages and perl-script are handled by xpp/Makefile.am
* Removed from xpp/Makefile.legacy
* Detect perl and set perllibdir in configure.ac
* Handle modules in their own xpp/perl_modules/Makefile.am
* Enclose perl-related stuff in conditional
* Updates for "make dist"

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2015-05-19 19:52:15 +03:00
Russ Meyerriecks 4e14561508 wcte43xp: Teach tools about te436 and te236 products
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2014-07-18 10:41:54 -05:00
Oron Peled ca09f327ed xpp: better dahdi_registration
Improvements to the xpp tool dahdi_registration:

* Use the new xpp driver with support for dahdi_registration sysfs
  attribute in each device.

* Wait for UDEV to finish handling span assignments (via
  dahdi_waitfor_span_assignments).

* Still supports legacy drivers without this, by falling back
  to old style iterative "registration" on each xpd.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2014-06-29 16:30:34 +03:00
Oron Peled 1e6b2741db dahdi_genconf: remove hard-coded E1 default
* The "spantypes" generator had E1 default if no 'line-mode' parameter
  was passed.

* As a result the new logic in "dahdi_span_types dumpconfig" had no
  effect when called from dahdi_genconf, as it was always called
  with "--line-mode=" argument.

* Now "dahdi_genconf spantype" behaves just like
  "dahdi_span_types dumpconfig":
  - The "--line-mode=" forces generation of provided line-mode (E1/J1/T1)
  - Without this option, the generated config matches the current spans
    state according to new dahd_span_types default logic:
    - Wildcard rule if all spans have same line-mode.
    - Uncommented specific matches if spans have different line-modes.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2014-04-30 22:51:58 +03:00
Tzafrir Cohen b8d1e467e4 dahdi_perl: fix regression with an AB with no modules
Fixes a regression introduced in
3572bb5a13 (before 2.7.0) - most of the
dahdi_perl tools will fail for an Astribank with no modules claiming
"No XPDs for '/sys/bus/astribanks/devices/xbus-00'"

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2014-01-23 22:32:45 +02:00
Oron Peled b621c02b7f Change span-type.conf generation policy
* Add '--line-mode=<E1|T1|J1>' option to dahdi_span_types:
  - Will first generate a wildcard entry (* *:<type>)
  - All later entries will be commented-out.
  - Manually uncommenting any of them will create an "override"
    (e.g: mixed system with all spans T1, but some E1)

* Now dahdi_genconf does not generate span-types.conf by default:
  - Added '--line-mode=<E1|T1|J1>' option to trigger generation
  - This parameter will be passed to "dahdi_span_types dumpconfig"
  - Also explicit specification of 'spantypes' as an argument will
    trigger a similar generation (with a default of 'E1').
  - The line-mode may also be passed to the generator directly
    with identical results. Example:
          dahdi_genconf spantypes=line-mode=T1

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com>
2014-01-23 21:32:14 +02:00
Russ Meyerriecks a6203e151f wcte13xp: Teach tools about te131 te132 products
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2014-01-22 17:45:58 -06:00
Shaun Ruffell ffced0cad2 Add dahdi_ prefix to handle_device, span_types, span_assignments, and span_config.
All new dahdi tools and utilities will be prefixed with "dahdi_" in order to
avoid any future conflicts with other packages.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Oron Peled <oron.peled@xorcom.com>
2013-11-26 13:50:02 -06:00
Oron Peled 2a84216fe4 Terminology rename: "pinned" -> "assigned"
* File names fixed
* File contents fixed

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-11-24 16:42:15 +02:00
Shaun Ruffell 8d9a6bdd80 dahdi_genconf: Do not fail if pinned/assigned span utilities were not installed.
If you installed dahdi tools and did not specify DAHDI_PINNED=yes on the
makefile, when you run dahdi_genconf you would get an error like the following:

  # dahdi_genconf
  sh: span_types: command not found
  Command failed (status=32512): 'span_types dumpconfig > /etc/dahdi/span-types.conf' at ...

This change allows the generator for span-types.conf and span-assignements.conf
check for the existence of the utilities before attempting to call them.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2013-11-22 11:12:12 -06:00
Shaun Ruffell bb19620c52 wcte43x: Teach tools about the wcte43x driver.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2013-11-11 15:40:11 -06:00
Shaun Ruffell 11310bde53 wcaxx: Teach tools about the wcaxx driver.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2013-11-11 15:39:51 -06:00
Oron Peled 44a5285454 add new dahdi_genconf generators
* pinnedspas: For /etc/dahdi/pinned-spans.conf
* spantypes: For /etc/dahdi/span-types.conf

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-01 21:58:04 +03:00
Russ Meyerriecks 2380c99c5f Add support for Digium's new te13x line of cards
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-28 17:06:10 -05:00
Shaun Ruffell 6e3da02523 dahdi_hardware: Detect the Digium TE820 card.
Adding the TE820 vendor and device ID into PCI.pm allows dahdi_hardware to
recognize the card.

Reported-by: Xavier Hienne
Internal-Issue-ID: DAHTOOL-58
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10680 17933a7a-c749-41c5-a318-cba88f637d49
2012-05-14 16:11:06 +00:00
Oron Peled eff70f98dc xpp: Update product ID's in Dahdi::Hardware::USB
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10505 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:46:27 +00:00
Oron Peled 3572bb5a13 xpp: sysfs access cleanups
With /proc/xpp code removed, some cleanup can be done.

* No need to search alternative attribute names, so xbus_attr_path() is
  redundant.

* Don't compose xbus sysfs directory in multiple code locations.
  Do it once in Xbus->new() and use the result ($xbus->sysfs_dir)

* Pass XPD directory strings directly to Xpd->new()
  - So we parse it for unit/subunit only in Xpd->new()

* Don't parse xbus sysfs name:
  - Toplevel scan, pass it as is to Xbus->new()
  - Xbus->new() deduce the xbus->num from the naming
    of Xpd's inside (nnⓂ️k) -- this is a hack until
    we add xbus number as an xbus sysfs attribute

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10494 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:32:27 +00:00
Oron Peled 6027d2d1d1 xpp: perl_modules: Remove /proc/xpp usage
* All references to old /proc/xpp interface were removed.
* Everything is now done via sysfs

Information has been available from /sys/bus/astribanks since before
Dahdi-linux 2.2 .

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10492 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:30:41 +00:00
Tzafrir Cohen 03c0afef41 DAHDI-perl: Fix PCI ID for Rhino R4T1 (0b0b:0305)
(Closes issue DAHTOOL-56)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10358 17933a7a-c749-41c5-a318-cba88f637d49
2011-11-30 20:15:33 +00:00
Shaun Ruffell bc6250fe1f dahdi_genconf: Allow it to recognize the TE8xx 8-port cards.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10308 17933a7a-c749-41c5-a318-cba88f637d49
2011-11-02 20:55:52 +00:00
Tzafrir Cohen 2457399d92 dahdi_perl: Use $Dahdi::sys_base for sysfs pathes
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10267 17933a7a-c749-41c5-a318-cba88f637d49
2011-10-23 14:43:27 +00:00
Tzafrir Cohen a81a43c9b6 xpp_order generator: ignore EC XPD
The xpp_order configuration generator should only loop over telephony
devices, not all spans.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10266 17933a7a-c749-41c5-a318-cba88f637d49
2011-10-23 14:28:40 +00:00
Tzafrir Cohen 5efd590aef chandahdi gen: extens can have any num of digits
Don't force extens we generate to have exactly 4 digits (simple
formatting limitation).

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10265 17933a7a-c749-41c5-a318-cba88f637d49
2011-10-23 14:23:17 +00:00
Shaun Ruffell 250bc06238 dahdi_genconf: Use 'dahdi_scan' to determine span_type for B410P cards.
The wcb4xxp driver does not put enough information in the proc filesystem to
determine if the ports are in TE or NT mode.  Previously the ports would
always just setup the dahdi-channels.conf file in TE mode. After this change
the dahdi_scan utility is used to detect if the ports are in TE or NT mode and
setup dahdi-channels.conf appropriately.

Internal-Issue-ID: DAHTOOL-54
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10214 17933a7a-c749-41c5-a318-cba88f637d49
2011-09-29 17:00:51 +00:00
Shaun Ruffell db9b649e03 dahdi_genconf: Assume spans with unknown term types are software selectable.
Resolves a regression on the 2.5 branch that would result in:

  $ dahdi_genconf
  dahdi_genconf: missing default group (termtype=UNKNOWN)

E1 / T1 spans use software configuration to set CPE / NET mode. This
patch will just assume that a termtype is software selectable if it was
"UNKNOWN" when first scanning the span.

Internal-Issue-ID: DAHTOOL-55
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Tested-by: David Purdue <support@noojee.com.au>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10213 17933a7a-c749-41c5-a318-cba88f637d49
2011-09-29 17:00:46 +00:00
Oron Peled b23f3ca5a9 dahdi-perl: Also get USB loaded driver from usbfs
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10153 17933a7a-c749-41c5-a318-cba88f637d49
2011-08-25 10:32:17 +00:00
Tzafrir Cohen a5c6e58b6e dahdi-perl: Freepbxdb config generator
Use 'dahdi_genconf freepbxdb' to generate the required astdb entries
for Asterisk to use the extensions generated by dahdi_genconf. Requires
asterisk to be running.

This module is intended for testing as it bypasses standard FreePBX
functions only and hence may not work properly with Freepbx.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10142 17933a7a-c749-41c5-a318-cba88f637d49
2011-08-18 15:38:45 +00:00
Tzafrir Cohen 2061c6c359 xpp: pri_termtype: match complete SPAN patterns
Match complete span patterns, to avoid pattern 'SPAN/1' from matching
e.g. span 12 (SPAN/12).

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10101 17933a7a-c749-41c5-a318-cba88f637d49
2011-08-09 13:11:20 +00:00
Shaun Ruffell caa8c947b7 Span.pm: Process the /proc/dahdi/<x> files atomically.
It is possible that the contents of the proc files can change while the
perl modules are in the processing of processing them.

Specifically, if lsdahdi is called on boot before the channels are
configured, the channel will be "probed" to determine if it's an FXO or
FXS channel and that can result in the output of proc changing. When the
size of proc changes, the script can get confused about where the
beginning of the next line is.

This patch reads in the proc file completely into memory first, and then
starts processing each of the lines.

This resolves the "Unrecognized garbage 'INACTIVE)' in -" that is
displayed on boot with the recent trunk of DAHDI.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10040 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-12 23:01:02 +00:00
Tzafrir Cohen ccd13cfd47 xpp: support loading Octasic EC firmware
Echo Cancellation firmware is loaded by xpp/stribank_hexload
(Using the oct612x code).

* astribank_hexload: options -O/-o/-A for handling the Octasic echo
  cancellation firmware.
* astribank_tool: report that.
* xpp_fxloader: Run astribank_hexload, if needed.
* dahdi_perl: The EC module is an extra XPD, but not a "telephony device"
  and hence not a span. Deal with that.
* waitfor_xpds: may need to wait a bit longer for firmware loading.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>


git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10032 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-10 16:25:18 +00:00
Tzafrir Cohen 9ae57618d3 fix registration order for more than 9 Astribanks
The sorting function for SORT_XPPORDER accidentally sorted the Astribank
priorities from the xpp_order file (/etc/dahdi/xpp_order) lexicographically
instead of numerically, that is: 10 before 2.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9986 17933a7a-c749-41c5-a318-cba88f637d49
2011-06-23 17:33:43 +00:00
Tzafrir Cohen f46df849da dahdi_genconf: apply termtype to Digium HA8 BRI
Make the pri_termtype setting in genconf_parameters apply to any BRI/PRI
carddeclared as "soft NT". ATM, this is only the Xorcom E1/T1 device
and the Digium HA8 (BRI) module of the TDM card.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9979 17933a7a-c749-41c5-a318-cba88f637d49
2011-06-16 09:35:32 +00:00
Tzafrir Cohen 366eccb556 dahdi-perl: more left-over $span->xpd
Replace the remaining $span->xpd with xpd_of_span().

Following up on r9648.

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9731 17933a7a-c749-41c5-a318-cba88f637d49
2011-02-06 18:39:57 +00:00
Tzafrir Cohen d765176efd dahdi-perl: fix xpp driver in dahdi_hardware
Don't require 'dahdi_hardware -v' to show the driver for a USB device.
Only works when the usbfs is not used (when /proc/bus/usb is not mounted).

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9699 17933a7a-c749-41c5-a318-cba88f637d49
2011-01-25 10:11:36 +00:00
Tzafrir Cohen fae45054b1 dahdi-perl: left-over $span->xpd
Replace one remaining $span->{XPD} with xpd_of_span().

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9648 17933a7a-c749-41c5-a318-cba88f637d49
2011-01-20 18:06:38 +00:00
Kinsey Moore 88035ea78c dahdi_genconf: Don't generate configurations that use channel 16 on E1 CAS
Attempting to use channel 16 on E1 CAS is disallowed since that channel is
reserved for RBS signaling.  Configurations should not be generated that
attempt to use it.

Closes DAHDI-763.

Patch by dmartinez.


git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9485 17933a7a-c749-41c5-a318-cba88f637d49
2010-11-17 15:32:52 +00:00
Tzafrir Cohen a3ae25141a Dahdi::Hardware: Support beroNet BN4S0e PCI Express card
Add extra PCI IDs to support "beroNet BN4S0e PCI Express 4x S0 Karte".

Origin: http://bugs.debian.org/600839


git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9452 17933a7a-c749-41c5-a318-cba88f637d49
2010-10-20 18:02:35 +00:00
Asterisk Development Team 466357f5c2 Import DAHDI-Tools r9159
This revision of DAHDI-Tools is the base revision for the switch to
git.

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/tools/trunk@9159
2010-08-18 13:49:24 +00:00