Child pages
  • Localization of Region Specific Files
Skip to end of metadata
Go to start of metadata

Currently the support for region specific configuration files is limited to dial plan templates. Region specific configuration files for gateways and phones will be introduced in later releases.

To provide a dial plan template for a region, include a directory region_rid (where rid is the region ID corresponding to that region) with the template file dialrules.beans.xml in the localization package.

For information about the creation of a dial plan template, please see the page How to Localize the Dial Plan. The information and tips below may be helpful when completing this step.

Information Required for a Dial Plan Template

To create a new dial plan template, you have to gather the following information for your region:

  • PSTN prefix (if any) for local calls, long distance calls, international calls, calling to mobile phones, calling to information services and calling to emergency numbers.
  • Area codes or starting digits of area codes used for normal long distance numbers, location independent long distance numbers, tool free numbers, special tariff numbers (premium rate services, adult phone lines, entertainment phone numbers, etc.) and mobile phone numbers.
  • Telephone numbers for paid information services and telephone numbers for free information services (if any).
  • Emergency telephone number (central emergency phone number, fire department, police, ambulance, etc.).

Dial Plan Template File Name and Format

With the above information ready, you must create appropriate rules in the format of a beans XML file stored in the UTF-8 format. The file name is this XML file must be dialrules.beans.xml - the directory name (region_rid) in which the file is stored determines the region that uses this template.

Region Specific Bean IDs

When defining beans, it is necessary to use unique bean IDs in your template. The recommended approach is to use a region identifier as the prefix for each bean ID. For example, for the United Kingdom dial plan template, the following bean IDs could be used:

  • uk.voicemailRule
  • uk.attendantRule
  • uk.emergencyRule
  • uk.oldEmergencyRule
  • uk.nonUrgentEmergencyRule
  • uk.longDistanceRule
  • uk.locationIndependentRule
  • uk.premiumRate
  • uk.basicRate
  • uk.nationalRate
  • uk.tollFreeRule
  • uk.infolineRule
  • uk.mobileRule
  • uk.internationalRule

Parent Rules

For each bean, use an appropriate default rule as its parent. For example, the basic long distance rule for a region should use defaultLongDistanceRule as its parent. Other long distance rules for the same region should then use this basic long distance rule as their parent. In the case of the United Kingdom, the uk.longDistanceRule should use defaultLongDistanceRule as its parent and other long distance rules (uk.locationIndependentRule, uk.premiumRate, uk.basicRate, uk.nationalRate and uk.tollFreeRule) should use uk.longDistanceRule rule as their parent.

Dial Plan Template Example

The example of a dial plan template for the United Kingdom defines the beans listed above. When creating rules, make sure to:

  • Specify only one number in the "emergencyNumber" property (multiple rules are required if you have more than one emergency number)
  • Separate multiple area codes in the "areaCodes" property only by comma (spaces are not permitted)
  • List all beans with dial plan rules in the last bean (e.g., uk.dialPlan) that defines all rules included in your dial plan template
 <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
 <beans>
  
  <bean id="uk.voicemailRule" parent="defaultInternalRule" singleton="false">
    <property name="name" value="Voice mail" />
    <property name="description" value="Default voice mail dialing plan" />
    <property name="voiceMail" value="101" />
    <property name="voiceMailPrefix" value="8" />
  </bean>
  
  <bean id="uk.attendantRule" parent="defaultAttendantRule" singleton="false">
    <property name="name" value="Auto attendant" />
    <property name="description" value="Default auto attendant dialing plan" />
    <property name="extension" value="100" />
    <property name="attendantAliases" value="operator 0" />
  </bean>
  
  <bean id="uk.emergencyRule" parent="defaultEmergencyRule" singleton="false">
    <property name="name" value="Emergency" />
    <property name="description" value="Emergency - central telephone number" />
    <property name="optionalPrefix" value="9" />
    <property name="emergencyNumber" value="112" />
  </bean>
  <bean id="uk.oldEmergencyRule" parent="uk.emergencyRule" singleton="false">
    <property name="name" value="Old Emergency" />
    <property name="description" value="Emergency - old central telephone number" />
    <property name="emergencyNumber" value="999" />
  </bean>
  <bean id="uk.nonUrgentEmergencyRule" parent="uk.emergencyRule" singleton="false">
    <property name="name" value="Non-urgent Emergency" />
    <property name="description" value="Emergency - non-urgent emergencies" />
    <property name="emergencyNumber" value="101" />
  </bean>
  <!-- properties for all long distance rules:  pstnPrefixOptional, pstnPrefix, 
    longDistancePrefixOptional, longDistancePrefix, externalLen, permissionName -->
  <bean id="uk.longDistanceRule" parent="defaultLongDistanceRule" singleton="false">
    <property name="pstnPrefixOptional" value="true" />
    <property name="pstnPrefix" value="9" />
    <property name="longDistancePrefixOptional" value="false" />
    <property name="longDistancePrefix" value="0" />
    <property name="name" value="Long Distance" />
    <property name="description" value="Long distance dialing plan" />
    <property name="areaCodes" value="1,2" />
    <property name="externalLen" value="10" />
    <property name="permissionName" value="LongDistanceDialing" />
  </bean>
  <bean id="uk.locationIndependentRule" parent="uk.longDistanceRule" singleton="false">
    <property name="name" value="Location Independent" />
    <property name="description" value="Location independent telephone numbers" />
    <property name="areaCodes" value="3,55,56" />
  </bean>
  <bean id="uk.premiumRate" parent="uk.longDistanceRule" singleton="false">
    <property name="name" value="Premium Rate" />
    <property name="description" value="Premium rate services" />
    <property name="areaCodes" value="90,91,98" />
    <property name="permissionName" value="900Dialing" />
  </bean>
  <bean id="uk.basicRate" parent="uk.longDistanceRule" singleton="false">
    <property name="name" value="Basic Rate" />
    <property name="description" value="Special services - basic rate" />
    <property name="areaCodes" value="84" />
  </bean>
  <bean id="uk.nationalRate" parent="uk.longDistanceRule" singleton="false">
    <property name="name" value="National Rate" />
    <property name="description" value="Special services - national rate" />
    <property name="areaCodes" value="87" />
  </bean>
  <bean id="uk.tollFreeRule" parent="uk.longDistanceRule" singleton="false">
    <property name="name" value="Toll Free" />
    <property name="description" value="Toll free dialing" />
    <property name="areaCodes" value="80" />
    <property name="permissionName" value="TollFree" />
  </bean>
  <bean id="uk.infolineRule" parent="uk.longDistanceRule" singleton="false">
    <property name="name" value="Information" />
    <property name="description" value="Information services" />
    <property name="longDistancePrefixOptional" value="true" />
    <property name="longDistancePrefix" value="" />
    <property name="areaCodes" value="118" />
    <property name="externalLen" value="6" />
    <property name="permissionName" value="900Dialing" />
  </bean>
  <bean id="uk.mobileRule" parent="uk.longDistanceRule" singleton="false">
    <property name="name" value="Mobile Phones" />
    <property name="description" value="Mobile phone dialing" />
    <property name="areaCodes" value="75,77,78,79" />
    <property name="permissionName" value="Mobile" />
  </bean>
  <bean id="uk.internationalRule" parent="uk.longDistanceRule" singleton="false">
    <property name="name" value="International" />
    <property name="description" value="International dialing" />
    <property name="longDistancePrefix" value="00" />
    <property name="externalLen" value="-1" />
    <property name="areaCodes" value="" />
    <property name="permissionName" value="InternationalDialing" />
  </bean>
  
  <bean id="uk.dialPlan" parent="defaultDialPlan" singleton="false">
    <property name="rules">
      <list>
        <ref bean="uk.voicemailRule" />
        <ref bean="uk.attendantRule" />
        <ref bean="uk.emergencyRule" />
        <ref bean="uk.oldEmergencyRule" />
        <ref bean="uk.nonUrgentEmergencyRule" />
        <ref bean="uk.longDistanceRule" />
        <ref bean="uk.locationIndependentRule" />
        <ref bean="uk.premiumRate" />
        <ref bean="uk.basicRate" />
        <ref bean="uk.nationalRate" />
        <ref bean="uk.tollFreeRule" />
        <ref bean="uk.infolineRule" />
        <ref bean="uk.mobileRule" />
        <ref bean="uk.internationalRule" />
      </list>
    </property>
  </bean>
 </beans>
  • No labels