• Oron Peled's avatar
    improved dahdi_span_types dumpconfig · f2628eee
    Oron Peled authored
    * Better defaults:
      - A wildcard match:
        - If '--line-mode' option is given, generate a wildcard entry.
          (existing behavior).
    
        - Otherwise, if *all spans* are of the same type (E1/T1),
          generate a wildcard entry for this type.
          This is the most common use-case and now it work without
          any command line flags.
    
        - Otherwise (mixed E1/T1 spans), do not generate a wildcard entry.
          This isn't common case (except from our labs), but regardless
          without '--line-mode' any guess could be wrong.
    
      - Specific device matches:
        - If all spans are of the same type, generate commented out
          specific entries (for manual overrides).
    
        - If spans have mixed E1/T1 types, generate specific entries
          In this case, specific entries MUST NOT be commented out
          otherwise, the configuration file is wrong!
    
    * Generated header with better organization:
      - Shows what is generated:
        - Generating wildcard / Not generating wildcard
        - Generating specific lines / Generating *commented-out* specific lines
    
      - For each decision, show *why* it was taken.
    Signed-off-by: default avatarTzafrir Cohen <tzafrir.cohen@xorcom.com>
    Acked-by: default avatarRuss Meyerriecks <rmeyerriecks@digium.com>
    f2628eee
dahdi_span_types 9.08 KB