* Fix small compile warnings (which are now errors):
- hdlcgen.c
- hdlcstress.c (remove return value which isn't checked)
- patlooptest.c
* Also added dev-mode to xpp with relevant compile fixes.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Install via doc/Makefile.am
* Remove relevant code from Makefile.legacy
* For now, leave the conversion to HTML in Makefile.legacy
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Set udev installation directory to $sysconfdir/udev/rules.d
* Add definitions to xpp/Makefile.am and remove them from xpp/Makefile.legacy
* TODO: add "--with-udev-rulesdir=" for packagers (/lib/udev/rules.d)
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* 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>
* Added xpp/oct612x/Makefile.am:
- Compile octasic sources into a convenience library (static, not installed)
- Set OCTASIC_CFLAGS in configure.ac, as they are used in two
Makefile.am's
- Added relevant Makefile.in and Makefile into build_tools/make_dist
* In xpp/Makefile.am:
- Have USE_OCTASIC conditional (currently configure.ac always set it to true)
* Added PBX_USB automake conditional, so we only build our tools if
configure'd for libusb.
* Create two convenience libraries (libastribank and libecholoader)
Statically link them into our tools.
* Handle man-pages for the tools.
* Remove all new functionality from xpp/Makefile.legacy -- it now
contains:
- All perl related tools and man-pages
- Other misc stuff (udev files, etc.)
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Added needed boilerplate to configure.ac
* Wrap original Makefile's with automake:
- Renamed all original Makefile -> Makefile.legacy
- Force automake generated Makefile to call Makefile.legacy:
Currently handle: all, install, clean, distclean, dist, docs, config
- Note: our temporary 'dist' target conflicts with automake 'dist' target.
* Temporarily added extra dist files into build_tools/make_dist
(until we move "make dist" functionality into automake)
* For now, we don't try to compile ppp/ as it wasn't compiled
from the top-level Makefile before.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Autoconf use this name as the "PACKAGE_NAME":
* Available as a macro to compiled code and Makefile's
* With automake, this determines the name of the tarball
produced in "make dist"
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
The TOOLSVERSION was inconsistent in configure.ac and Makefile:
* Rename the second parameter to AC_INIT() into short_version
* Calculate TOOLSVERSION during configure and use it to
generate version.c from version.c.in
* For now, leave duplicate TOOLSVERSION in Makefile (for make dist)
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
If we have /etc/dahdi/span-types.conf but it doesn't have any
line, we should avoid using the option -S to astribank_hexload.
Fix the test for this.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Don't run the final astribank_is_starting if asterisk is hotpluggable.
Likewise, if there's no xpp_order file, waiting is pointless as the hook
can't count Astribanks.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* 'time' was added here for debugging and never actually needed.
* It actually causes a minor bashism issue.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* New asynchronous behavior is used only when two conditions are met:
- Finding new $ASTERISK_SUPPORTS_DAHDI_HOTPLUG=yes in /etc/dahdi/init.conf
This should be set only when Asterisk support hotplug and configured
to use it (no_failed_channels==1).
- DAHDI auto_assign_spans==0
* Adapt /usr/share/dahdi/astribank_hook:
- Refactor old twinstar behavior into functions
- Add new behavior in a function (just enable the Asrribank watchdog)
- Call the correct function.
* Adapt init script:
If asynchronous behavior is on, don't wait for all Astribanks to
finish initialization (it's enough that we saw all/some of them)
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Do print a message if no semaphore exists. It means that either there
are no Astribanks, or existing Astribanks were already initialized.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Initialize db to 1.0 instead of doing it in a few, but not all, logic contexts.
Reported-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Why:
* Doing "clear_halt" is normally the right thing to do on startup.
* The original observed problem is better fixed via USB bios settings.
* Defaulting to no "clear_halt" cause more problems on other platform
combinations (hardware/kernel).
The change:
* We now reverted to do "clear_halt" by default.
* The XTALK_OPTIONS may now contain either "use-clear-halt" (the default)
or "no-use-clear-halt" to override for debugging/testing.
Original commit: ca7c04e9cb
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
DAHDI 2.9.2 added support for -S (span specs). However if this option
was not specified, it fails to run.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
The variable 'default_law' was the result of a partial renaming of the
original variable 'law'. Let's keep all of them in sync.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
The Congestion tone in Australia must be reduced by 10 to 15 dB
at every other cadence and the frequencies for both at cadences are 425 Hz.
From: Armen Karlozian <armeniki@hotmail.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
The default 'us' tone is most likely better than silence when Asterisk tries to
generate the recall tone on a DAHDI channel.
Internal-Issue-ID: DAHTOOL-63
Reported-By: Igor Kravets
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Logic was calling DAHDI_SPECIFY ioctl on all channels up to maximum channel
limit. Added a short circuit to prevent the ioctl on channels that aren't
configured.
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
Hopefully will save a little time in the future if anyone ever types into
/etc/dahdi/system.conf:
bchan=1-15,17-30:1101
when they meant:
cas=1-15,17-30:1101
in the future.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
If dahdi_cfg is terminated while holding the named semaphore, it is possible to
leave it behind and all subsequenct invocations of dahdi_cfg will block waiting
for it.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
* Added optional '-S <span-spec>' argument to astribank_hexload:
- Allow passing PRI span specification to EC firmware loader.
- The span specifications is whitespace/comma separate list
of items.
- Each item is: <span>:<type> (Example: 3:T1)
- The <span> may use shell-like globbing (e.g: *:E1 or [12]:T1)
- Any span not matched in the span specification will be set
as without the new '-S' option (i.e: depends on the '-A' option).
* Adapted xpp_fxloader:
- Read specification for both device label and wildcard from
/etc/dahdi/span-types.conf
- If the result is non-empty, pass it as '-S <span-spec>' to
the EC firmware loader.
* Read first from modern configuration files
(/etc/dahdi/span-types.conf)
- Support either exact label match or complete '*' match in the
configuration file.
* Fallback to legacy /etc/dahdi/xpp.conf
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
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>
* Don't use "usb_clear_halt" by default anymore
- It caused problems with specific devices in the past
- Now it cause problems with specific servers as well (64 bits, USB3)
* Add an "XTALK_OPTIONS" environment variable to pass options:
- Use it to implement a "use-clear-halt" boolean option that
restore original behavior.
- Also use it for "no-lock" option which replace the legacy
environment variable "XUSB_NOLOCK".
* Compile with "-Wall -Werror"
* Better dependency calculation:
- Explicit listing of sources, don't use wildcards.
- Pass various CFLAGS to dependency calculation as well.
- Make sure a failure is propagated
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Single frequency signalling has not been supported in dahdi_cfg since the switch
to DAHDI. Before DAHDI, in the Zaptel days, it was only suported in the
ztcfg_dude utility which wasn't mainlined. So this removes references to those
signalling modes unless support is added back into the driver.
Internal-Issue-ID: DAHLIN-335
Signed-off-by: Shaun Ruffell <sruffell@digium.com>