Creating a DID-Range-Based LRT File

A DID-Range-Based LRT file is a well-formed XML document with a <localRoutes/> root element.

The following attribute is found within the <localRoutes/> element.

type — This attribute is required for a DID-range-based LRT; set this attribute’s value to range.

<localRoutes/> can contain any number of child <route/> elements.

Each <route/> element contains:

  • a required <user/> element that (1) defines the LRT type, and (2) in the case of a DID-range-based LRT, specifies a contiguous range of DID telephone numbers

    The following attributes are found within the <user/> element:

    type — This required attribute can be assigned one of three enumerated values (E164, string, or range); for a DID-range-based LRT, you must use the range value.

    rangeStart — This required attribute specifies the start value for the DID range.

    rangeEnd— This required attribute specifies the end value for the DID range.

    rangePrefix — This optional attribute specifies the common prefix for the range bracketed by the rangeStart and rangeEnd attributes.

  • a required <next/> element that uses regular expression syntax to specify the routing next hop
  • an optional <description/> element that provides information relevant to the range of DID addresses

When crafting your LRT file, keep the following rules in mind.

  1. Set the type attribute of the <localRoutes/> root element to range.
  2. Set the type attribute of all <user/> elements to range; <user/> elements of types other than range are invalid.
  3. The start and end values of a range, must be valid E164 numbers.
  4. The start and end values of a range, must contain the same number of digits.
  5. The value of the rangeStart attribute must be less than, or equal to, the value of the rangeEnd attribute.
  6. Ranges must not overlap. For example, the following ranges overlap.

    1000 - 1050

    1025 - 9999

    These ranges do not overlap.

    5510 -5519 (defines a contiguous range from 5510 through 5519)

    55100 - 55199 (defines a contiguous range from 55510 through 55519)

  7. After completing the LRT file, you must use FTP or SFTP to install the file in the ESD /code/lrt directory.

    The following annotated XML sample provides a template to assist users in crafting their own LRT file.

    <?xml version=”1.0? encoding=”US-ASCII” standalone=”yes”>
    
    <!-- A Local Routing Table (LRT) file based on DID ranges -->
    
    <localRoutes type=”range”>  <!-- set to range for DID LRT -->
    
    <!-- At least one <route/> element is required -->
    
    <!-- A one number range -->
         <route>
    <!-- <user/> element is required -->
              <user type=”range” rangeEnd=”5558888” rangeStart=”5558888”></user>
    <!-- <description/> element is optional -->
              <description>CampusSecurity</description>
    <!-- <next/> element is required -->
    <!-- the next hop for CampusSecurity expressed as a regex -->
              <next type=”regex”>!^.*$!sip:1@public-range!</next>
         </route>
    
    <!-- A multi-number range matches 149 through 155 -->
         <route>
              <user type=”range” rangeEnd=”155” rangeStart=”149”></user>
              <description>Quad 1</description>
    <!-- the next hop for 149-to-155 expressed as a regex -->
              <next type=”regex”>!^.*$!sip:1@public-range!</next>
         </route>
    
    <!-- A multi-number range with a prefix matches a1b149-to-a1b155 -->
         <route>
              <user type=”range” rangePrefix=”a1b” rangeEnd=”155”
               rangeStart=”149”></user>
              <description>Quad 1</description>
    <!-- the next hop for aib149-to-aib155 expressed as a regex -->
              <next type=”regex”>!^.*$!sip:1@public-range!</next>
         </route>
    </localRoutes>