Commit Graph

21 Commits

Author SHA1 Message Date
Tzafrir Cohen cffc5158cc dahdi_cfg: -S has assumtions on system.conf order
dahdi_cfg's -S (apply only to a specific span) uses the array chan2span
to map channel numbers to span numbers.

The problem is that it assumes that channels first appear in system.conf
immediately after the span line of a specific span. Thus the following
configuration breaks it:

span=1,...
span=2,...
clear=1-2,4-5
dchan=3,6

The best fix for that is to require -C to be used when -S is used (which
is already the case in our udev hooks).

Fixes DAHTOOL-69.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2015-11-16 15:54:23 +02: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 703db3bcc3 automake: handle doc/ man-pages
* 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>
2015-05-19 19:54:11 +03:00
Tzafrir Cohen 98ecc272d1 hyphen/minus fixes in man pages
in groff '-' creates a hyphen and for a minus (path, option, or similar)
you need '\-'.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2014-01-27 20:29:04 +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
Oron Peled 451a8b4d6f dahdi_span_types: allow defaults + overrides
* Allow wildcards for both device and span number (as before).
  Example:
     *        *:T1

* But now we are carefull to follow strict order in the configuration
  file. This means, if there are multiple matches -- last one wins.

* So we can use specialisation:
     *        *:T1	# Everything is T1
     FOO      [34]:T1	# Except spans 3,4 on the FOO device

* Added --dry-run and --verbose options.

* Updated the man-page:
  - Fixed "registered" => "assigned".
  - Use "line mode" for E1/J1/T1.
  - Document current changes.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com>
2014-01-23 21:28:59 +02:00
Tzafrir Cohen 09fd3f53b1 dahdi_span_assignments.8: s/register/assign/
* Use the term "assignment" instead of "registration" (for spans).
* Further fixes.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com>
2014-01-23 21:27:58 +02:00
Oron Peled c3b020a155 new "dahdi_waitfor_span_assignments" tool
* Allows waiting until all spans are "assigned" or "unassigned"
* Current implementation use a polling loop with sleep
* Future implementation may block on sysfs attribute
  (like waitfor_xpds is blocking on sysfs Astribanks attribute)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2014-01-23 12:35:59 +02:00
Shaun Ruffell c0e19d47e8 dahdi_span_assignments, dahdi_span_types: Allow conf file to be overridden.
The environment variables that specified the full path the the configuration
files for dahdi_span_types and dahdi_span_assignments was documented, but they
were not actually set from the environment.

Also, the case of the variable was changed to match the one for the directory
where the rest of the config files are located.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2013-11-26 13:50:02 -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
Oron Peled c163caca00 fxotune: Now options '-b/-e' also apply with '-s'
* Now we can limit fxotune "set" mode to specific channel range.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-11-24 16:35:10 +02: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 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 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
Oron Peled ba070152fc dahdi_cfg: add '-S <spanno>' and '-C <chan-ranges>'
* dahdi_cfg -S <num>: only apply changes to span <num>.
* If span is analog (no 'span=<num>,<channels>,...' statement in
  system.conf), we need to set range: -C <channels>
* With the <basechan> and <channels> attributes in sysfs
  we easily configure each device on the fly.
  Simply run: dahdi_cfg -S <spanno> -C <basechan>+<channels>-1
  from udev script

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@10306 17933a7a-c749-41c5-a318-cba88f637d49
2011-11-02 20:10:06 +00:00
Tzafrir Cohen 2d576dcea0 Man page for dahdi_maint
Fix dahdi_maint's usage message while we're at it.

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

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10198 17933a7a-c749-41c5-a318-cba88f637d49
2011-09-09 13:45:00 +00:00
Tzafrir Cohen b487a96ada Update the dahdi-monitor man page
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10196 17933a7a-c749-41c5-a318-cba88f637d49
2011-09-09 12:04:34 +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