Commit Graph

127 Commits

Author SHA1 Message Date
Oron Peled
a1d4355c20 pinned-spans: fix examples in configuration files
* Correctly use the new "location" attribute
* Document the possibility to match against sysfs devpath
  (used to be the "location")

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-11-24 16:08:31 +02:00
Oron Peled
b303802658 pinned-spans: fix configuration file names
* Install them as *.conf.sample -- that's what they are
* Correctly rename spantype.conf to span-types.conf (new name)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-11-24 16:05:11 +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
Tzafrir Cohen
b123bc87dd xpp_fxloader: support loading AB with ID > 201
Support loading firmware for Astribanks with bcdDevice > 2.01, as we'll
have 2.02 soon.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-21 16:55:18 +03:00
Oron Peled
299d9d9d9c fix typos in man-page
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-14 15:45:21 +03:00
Tzafrir Cohen
5e30a1401f Man pages for span_types and span_assignments
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-13 23:28:46 +03:00
Tzafrir Cohen
2f688f83c4 Remove dahdi_map, obsoleted by span_assignments
dahdi_map can be replaced by span_assignments list / dumpconfig

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-13 11:03:00 -04:00
Oron Peled
680f3e1d1d dahdi_registration: adapt to pinned-spans
* If xpp.dahdi_autoreg parameter is 'Y' -- Skip actuall registration.
* If dahdi.auto_assign_spans is '0' and there's no /etc/dahdi/pinned-spans.conf
  Than use 'span_assignments auto ...' to assign device spans.
* Since dahdi_registration iterate in correct xpp_order, the span
  assignment logic provides migration path for users who did not
  generate their pinned-spans.conf configuration yet.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-13 11:02:47 -04:00
Oron Peled
60fca920bc span_assignments: -k / --keys and more
* New functionality (documented in the script header):
  - Alternative "keys" for device matching
  - Added new command line options: --help, --dry-run, --verbose, --key

* Clean sysfs attribute contents from special characters in every use-case.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-13 11:01:56 -04:00
Tzafrir Cohen
c1e016fa33 Do the Right Thing when there's no config
Do the "right thing" (hopefully. At least for a system with a single
device) if there is are no configuration files:

* No span-types.conf: just ignore it as before. It is optional.
* No pinned-spans.conf: use span_assignments auto (same as having
  dahdi.auto_assign_spans=1).
* No system.conf: generate a temporary one with dahdi_genconf.

This will hopefully allow having a partially-working system, and help
making ut usable with 'span_assignments dumpconfig'. Or maybe just work
as-is.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-13 10:18:34 -04:00
Oron Peled
dc5c7de9fc dahdi_cfg: can optionally read config from stdin
Allow for the convention of '-' marking stdin:

  dahdi_cfg -c -

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-08 10:05:09 -04:00
Oron Peled
1e81ed14cf Augment dahdi_genconf default generators list
Run Add spantypes and pinnedspans generators by default.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-01 22:01:35 +03: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
Oron Peled
7a1e222309 remove unused dahdi_cfg_device_args
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-01 21:57:42 +03:00
Tzafrir Cohen
52488d66fa handle_device: don't fail if no config files
Allow the udev rule to work well even if there's no span-types.conf

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-01 21:56:47 +03:00
Oron Peled
00af777a97 Newer version of DAHDI hotplug scripts
A newer version of the scripts fully adapted to pinned spans:
* handle_device does not run dahdi_cfg.
* A separate UDEV rule script for that: span_config. Should also work
  for the non-pinned case.
* span_assignments, span_types: add actions 'auto' (manually enable all)
  and 'dumpconfig' (dump current status in the format of configuration
  file).
* Fixed name of span_types and span_assignments (no '-').
* spantype.conf renamed span-types.conf: configuration files do have a
  dash.
* Those two are useful programs, insstalled to /usr/sbin.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-01 21:51:46 +03:00
Shaun Ruffell
025985d9b7 build_tools/make_version: Teach version string about git.
This copies in the make_version script from DAHDI-Linux to allow the version to
be properly reported from builds in git checkouts.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-06-26 16:45:03 -05: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
8b493f5ee2 fxotune: Use DAHDI_SPECIFY when opening by integer channel number.
In DAHDI-Linux 2.7 the layout of the /dev/dahdi files changes so that they are
grouped by span. When opening channels by number all utilities need to use
DAHDI_SPECIFY now.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-28 15:17:28 -05:00
Shaun Ruffell
2889d6afee dahdi_cfg: Make -S option based on spannumber instead of order in config file.
If the config file has two spans defined:

  span=1,1,0,esf,b8zs
  bchan=1-23
  dchan=24
  echocanceller=mg2,1-23
  span=2,2,0,esf,b8zs
  bchan=25-47
  dchan=48

And you only want to configure span-2, you would need to pass -S 1 to
dahdi_cfg. Now make the -S option take the span number as assigned in the
config file.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-28 12:34:03 -05:00
Shaun Ruffell
7939579d9e fxstest: Use DAHDI_SPECIFY when opening by integer channel number.
In DAHDI-Linux 2.7 the layout of the /dev/dahdi files changes so that they are
grouped by span. When opening channels by number all utilities need to use
DAHDI_SPECIFY now.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-28 12:34:03 -05:00
Tzafrir Cohen
bab1ac48f5 Update the configure script as well.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-24 16:58:15 -05:00
Tzafrir Cohen
3d1fd71af2 optionally install pinned files: --enable-pinned
Add installation of the pinned-spans support to the Makefile. For the
moment, however, they are not installed unless you use ./configure
--enable-pinned or build with 'make DAHDI_PINNED=yes'

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-24 16:58:15 -05:00
Oron Peled
ba3289ac9a Make udev run dahdi_cfg on each device:
* New script: dahdi_cfg_device_args:
   - Just like span_assignments, span_types: may be given
     one or more sysfs devpath's
   - Output the required options for dahdi_cfg. E.g:
       "-S 8 -C 15-28"
   - This may be passed (with any other wanted options)
     to the new dahdi_cfg (which supports '-S' and '-C')

 * Use dahdi_cfg_device_args in handle_device so we configure
   each span from udev.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-24 16:58:15 -05:00
Oron Peled
79fff3e278 basic user-space for pinned-spans
handle_device is the basic script intended to be called from udev.

It will call span_types on the span to apply optional
/etc/dahdi/spantype.conf onfiguration settings that need to be applied
before assignment (currently "pri" port types: E1/T1/J1).

Next it assigns span numbers to spans: if configured in
/etc/dahdi/pinned-spans.conf - use those settings. If not: by the order
of loading.

span_types and span_assignments can also be used to report the settings
they are used to configure.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-24 16:58:15 -05:00
Tzafrir Cohen
de23ca9c1a Don't fail init script if no modules
No point in loading the modules if nobody built them yet. It is a common
case for one to install the userspace tools package but not (yet?) build
the modules. See, e.g.  http://bugs.debian.org/706046 .

With this changeset, we exit gracefully in such a case.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-23 17:16:27 -05:00
Tzafrir Cohen
1f26e30907 Ignore generated files
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-23 17:16:27 -05:00
Shaun Ruffell
17027df04b dahdi_scan: Support gaps in channel numbering.
If, via the sysfs attributed introduced in DAHDI-Linux 2.5.0, a user has
configured spans that do not have contiguous channel numbers, dahdi_scan will
not print several of the span attributes in addition to a bad basechan number.

This patch allows dahdi_scan to try and get the basechan for a span from sysfs
as opposed to calculating based on the number of channels in the previous span
scanned.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2013-04-16 23:25:28 -05:00
Russ Meyerriecks
eacc071afe xpp: Fix compile error with fedora 17
One line change to re-include a missing header

Reported-By: Anthony Messina
Internal-Issue-ID: DAHTOOL-60
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-03-13 14:36:42 -05:00
Russ Meyerriecks
b8d8cc4f8d menuselect: Remove last bits completely from the repo
menuselect has not been used in dahdi-tools since r10411 (7 months ago). This
patch removes menuselect from the repository completely.

Reported-by: Sean Bright
Internal-Issue-ID: DAHTOOL-61
Patches: kill-menuselect.patch by Sean Bright (license #5060)

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>



git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10721 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-21 19:43:49 +00:00
Russ Meyerriecks
79ed81f9f5 dahdi-monitor: Fix broken control-C behavior and -F output option
After hitting control-C when writing a wav file, dahdi_monitor reports
"Failed to read in a full wav header. Expect bad things."

Also when using the -F output option, the wav header is not written.

Reported-by: Richard Miller
Internal-Issue-ID: DAHTOOL-59
Patch: dahdi_monitor.diff by Richard Miller (license #5685)
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10717 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-21 17:25:48 +00:00
Tzafrir Cohen
3114b89905 xpp: add missing include
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10715 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:46:23 +00:00
Oron Peled
44eb7cbb2a dahdi-tools: xpp: cleanup dead code in xtalk
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@10714 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:45:06 +00:00
Oron Peled
8b7c731fb6 xtalk: checkpatch clean (almost)
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: Xorcom xtalk (r10638)

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10713 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:43:41 +00:00
Oron Peled
b440b2da8c xtalk: Demote one ERR() to DBG()
(caller should decide on policy)

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

Origin: Xorcom xtalk (r9304)

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10712 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:41:00 +00:00
Oron Peled
ec71fef275 xtalk: Caller passes xusb_spec to xusb_find_iface()
* This xusb_spec:
  - Is a dummy struct used for this xusb instance only.
  - Is now passed by reference from caller.
  - So caller now manage the life cycle of this struct
* Also, demote one INFO() to DBG() (library should not print
  on its own)
* Also minor fix to DBG() output of spec initialization (leading 0)

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

Origin: Xorcom xtalk (r9303)

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10711 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:40:40 +00:00
Oron Peled
99ebb2a94c xtalk: allow dump_packet() without debug flags
xtalk: dump_packet() may now be used without debug flags by passing
mask == 0.

Origin: Xorcom xtalk (r9302)

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@10710 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:38:39 +00:00
Tzafrir Cohen
241e5e0144 README.Astribank: load module => module load
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10701 17933a7a-c749-41c5-a318-cba88f637d49
2012-07-29 11:31:39 +00: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
Shaun Ruffell
4873299399 blacklist: Add hfcmulti, hfcpci, and netjet.
If DAHDI is installed the vast majority of users will most likely not want
hfcmulti, hfcpci, or netjet loaded since they may conflict with DAHDI drivers
for the TDM400, B410P, and TE11XP cards.

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

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10601 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-28 16:35:23 +00:00
Oron Peled
4c7786a696 xpp: astribank_hook: wait for udev to settle
When running the astribank_hook (only on Astribanks, in XPP_HOTPLUG_DAHDI
mode), wait for all other Astribanks to create all the required device
files.

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@10585 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-22 17:38:57 +00:00
Tzafrir Cohen
88818f66cb xpp: astribank_allow: useless debug on write
Remove a useless debug message in the "write" operation.

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

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10549 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-20 10:43:00 +00:00
Tzafrir Cohen
617f45c795 xpp: fix build warnings
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10543 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-19 16:57:24 +00:00
Tzafrir Cohen
3d32d63163 xpp: oct612x: fix build warnings
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10542 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-19 16:45:40 +00:00
Oron Peled
cb4eae0e42 xpp: add forgotten include
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@10506 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:46:48 +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
65066704be xpp: clobber fpga_load
* It was replaced long ago by astribank_hexload/astribank_tool/astribank_allow
* It hasn't been used for several releases now, nor updated.
* Time to move into the eternal bit-bucket.
* Left (very) few strings as a tribute...

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@10504 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:45:57 +00:00
Oron Peled
be70b5b347 xpp: fix manpage of astribank_hexload
* Fixed 'astribanks_tool' string

Signed-off-by: Oron Peled <oron.peled@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10503 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:45:36 +00:00