Commit Graph

194 Commits

Author SHA1 Message Date
Tzafrir Cohen
67cc13f100 fix typos in some xpp utils
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10194 17933a7a-c749-41c5-a318-cba88f637d49
2011-09-09 10:59:39 +00:00
Tzafrir Cohen
3482a25b84 xpp: waitfor_xpds: higher and configurable timeout
On several pathological cases we may need to wait more than 40 seconds.
Make that timeout configurable.

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10177 17933a7a-c749-41c5-a318-cba88f637d49
2011-09-05 09:05:48 +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
12492f4e23 README.Astribank: HWEC and build instructions
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10104 17933a7a-c749-41c5-a318-cba88f637d49
2011-08-10 15:31:22 +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
Tzafrir Cohen
bad2f86c11 Extra README fixes: 'th' and ztcfg
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10087 17933a7a-c749-41c5-a318-cba88f637d49
2011-08-02 17:28:23 +00:00
Tzafrir Cohen
13f0f2235d spelling: ocnfig.status and such
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10085 17933a7a-c749-41c5-a318-cba88f637d49
2011-08-02 17:20:01 +00:00
Russ Meyerriecks
505621a31c 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>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10071 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-21 17:29:34 +00:00
Tzafrir Cohen
f2152481e9 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>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10068 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-21 13:40:18 +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
b4aa63049f xpp: astribank_hexload: yes, we HAVE_OCTASIC
Hardwire this for now, as this does not come from autoconf.

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10034 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-11 18:02:29 +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
d3cadf5352 xpp: A copy of oct612x in dahdi-tools
Include a copy of the oct612x Octasic echo canceller interface to be used
by astribank_hexload to load the echo canceller firmware to a Xorcom
Astribank.


git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10030 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-10 16:10:32 +00:00
Shaun Ruffell
52b37fa5f1 system.conf.sample: Add note regarding cross connecting spans on B410P.
There is an issue with the hardware on the B410P that makes it unreliable to
connect one of the ports to another port for testing.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10026 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-05 20:13:49 +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
Kinsey Moore
178ae27825 tools: Allow pattern tools to access channels above the device file limit
pattest and patgen already had this capability, but there were cases in which
they would act unexpectedly.  Now, if the name specified is not a character
device file, it will be treated as a channel number if possible.

Acked-by: Shaun Ruffell <sruffell@digium.com>


git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9975 17933a7a-c749-41c5-a318-cba88f637d49
2011-06-07 19:44:34 +00:00
Tzafrir Cohen
49a5fbfcd2 xpp: this is the right place for astribank_close()
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9973 17933a7a-c749-41c5-a318-cba88f637d49
2011-06-07 10:28:31 +00:00
Shaun Ruffell
24015f717e zonedata: Add support for United Arab Emirates.
This was provided for interop with analog lines provided by Etisilat.

DAHDI-796.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9920 17933a7a-c749-41c5-a318-cba88f637d49
2011-05-24 15:14:32 +00:00
Shaun Ruffell
29a06509ec zonedata: Add support for Costa Rica.
Add in the costa Rica zonedata.

(closes issue #19069)
Reported by: desafiocostarica

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9919 17933a7a-c749-41c5-a318-cba88f637d49
2011-05-24 15:14:25 +00:00
Kinsey Moore
4c177ef39c tools: Allow patlooptest to activate and handle buffer events
The new buffer events code introduced in revision 9905 gives userspace
processes an interface to activate detection of buffer over and underflows.
This change allows patlooptest to take advantage of that feature to better
inform users of the cause of pattern errors.

Acked-by: Shaun Ruffell <sruffell@digium.com>
(original patch by Matt Fredrickson)


git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9909 17933a7a-c749-41c5-a318-cba88f637d49
2011-04-18 21:20:10 +00:00
Tzafrir Cohen
ad02c5b314 astribank_is_starting.c: do have timeout (typo)
Due to a typo the option for not using a timeout was always used.

Regression since r9426.

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9831 17933a7a-c749-41c5-a318-cba88f637d49
2011-03-16 14:32:27 +00:00
Tzafrir Cohen
ed3da234d7 dahdi.init: LSB short description
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9830 17933a7a-c749-41c5-a318-cba88f637d49
2011-03-16 14:23:09 +00:00
Oron Peled
1c1fe1fd94 xpp: use 'xtalk' for the USB access code
* Move most of the USB access code from xpp/ to xpp/xtalk/ .
* astribank_tool and such tools can now use a shorter -D mmm/nnn rather
  than a full path.

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@9825 17933a7a-c749-41c5-a318-cba88f637d49
2011-03-10 18:48:11 +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
249baf1db3 README, UPGRADE.txt, system.conf.sample: Add documentation for using HWEC
Update documentation to the effect that HWEC is not enabled by default
and must be enabled manually if desired via "echocanceller" in system.conf.


git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9528 17933a7a-c749-41c5-a318-cba88f637d49
2010-12-09 22:44:52 +00:00
Russ Meyerriecks
d3d246b656 dahdi_maint: Added the loopup/loopdown functionality
Put back in the loopup and loopdown functionality which had been removed
from dahdi_tool

According to the spec AT&T TR 54016 we should keep the loopback
actuate and release signals on the line for 5 seconds.

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9517 17933a7a-c749-41c5-a318-cba88f637d49
2010-12-08 22:14:29 +00:00
Jason Parker
3f57781f6e Add 'install-tests' Makefile target.
Acked-by: Shaun Ruffell <sruffell@digium.com>


git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9499 17933a7a-c749-41c5-a318-cba88f637d49
2010-11-29 17:53:50 +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
e38b85fde9 xpp_fxloader: Don't try to load FPGA firmware twice
When called from udev to load the FPGA firmware, make sure that this is
not the event generated for the first end-point of the existing two, as
we need to talk with the second one.

This is probably better done in the udev rules, but will be slightly
more complicated to apply only to the FPGA loading and not to USB
firmware loading.


git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9482 17933a7a-c749-41c5-a318-cba88f637d49
2010-11-16 10:56:54 +00:00
Russ Meyerriecks
55a9fd2da2 dahdi_maint: Minor name change for the error counters
Make the error counters a little more readable, removed the prbs
counters since they are not currently functioning

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9477 17933a7a-c749-41c5-a318-cba88f637d49
2010-11-11 22:32:27 +00:00
Shaun Ruffell
393aef02ef dahdi_scan: Show CAS framing on the framing line.
Also, always append "/CRC4" on any span where that was specified as an
option.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9473 17933a7a-c749-41c5-a318-cba88f637d49
2010-11-10 16:19:36 +00:00
Russ Meyerriecks
3140dfc482 Fixed up the loss of crc4-multiframe alignment logic
Loss of crc4-multiframe alignment on an E1 link is not a condition which
brings the span down. The span will continue to run as long as it can
maintain double frame alignment. Because of this, we cannot place the
LMFA alarm in the usual spaninfo.alarms member, due to userspace
programs using this as a catch-all for a span being up or down.

We can detect the alarm by watching the frame error counter (fecount).
If it continuously increments, the span is configured for crc4, and the
span remains OK (alarms = 0), then we are in loss of crc4-multiframe
state.

In order to test this alarm, you'll need to synthesize a loss of crc4
alignment on the span. You can usually do this by configuring the local
span to use crc4 and the remote end to not use crc4. I used the Fireberd
6000 in my lab to do this.

dahdi-743 & dahdi-420

Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9458 17933a7a-c749-41c5-a318-cba88f637d49
2010-10-25 18:58:17 +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
Tzafrir Cohen
81205b90f7 astribank_is_starting: use semop if no semtimedop
astribank_is_starting should use a timeout for the semaphore, but if the
GNU-specific semtimedop() is not available, we'll just fall back to using
semop with no time out. Not as good, but better than nothing.

(closes issue #16783)
Reported by: abelbeck


git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9426 17933a7a-c749-41c5-a318-cba88f637d49
2010-10-17 18:41:24 +00:00
Shaun Ruffell
e878bc06dc dahdi_cfg: DAHDI_INDIRECT -> DAHDI_SPECIFY when configuring pciradio channels.
While slightly less efficient, this is only used when configuring the
channels initially (not the hot path) and allows dahdi-base.c to assume
that the open "file" pointer always refers to the channel on which to
perform the operation.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9352 17933a7a-c749-41c5-a318-cba88f637d49
2010-09-20 20:30:49 +00:00
Russ Meyerriecks
1462933a0d tonezone: Add Macao,China to tone zone data
Adding Macao tone zone data according to
http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf

(closes issue #17744)
	Reported by: alfredtang
	Patches:
	      zonedata.patch uploaded by alfredtang (license 1094)

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9313 17933a7a-c749-41c5-a318-cba88f637d49
2010-09-08 22:15:22 +00:00
Shaun Ruffell
3122b143a3 dahdi.init: Remove reference to dahdi_dummy.
Module 'dahdi_dummy.ko' is no longer needed for DAHDI to provide timing,
therefore we can remove the explicit load of dahdi_dummy, which by
default is aliased to dahdi.ko anyway.  If you've edited the DAHDI
Kbuild file in order to build dahdi_dummy explicitly, then you should
add dahdi_dummy to /etc/dahdi/modules in order to load it, but this is
not needed for normal operation.

(issue #17959)
Reported by: glen201

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9309 17933a7a-c749-41c5-a318-cba88f637d49
2010-09-07 18:27:57 +00:00
Kinsey Moore
8eea3312e5 PPP: Fix an incorrect function call that was causing dahdi.so to fail to load
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9220 17933a7a-c749-41c5-a318-cba88f637d49
2010-08-31 16:12:53 +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
Asterisk Development Team
a885b2c253 Import menuselect r1110
Menuselect was originally included in the DAHDI-Tools repository with an svn
external. Since git does not handle externals so well, menuselect is being
brought into the tree directly. This allows menuselect to be present for all the
commits on the 2.4, 2.5, and 2.6 releases.

The command is:
  $ svn export http://svn.asterisk.org/svn/menuselect/trunk menuselect

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2013-02-05 14:28:29 -06:00