Normalisation and Denormalisation
Overview
Normalisation and denormalisation rules may be defined for any N2SIP application. These rules exist within the config block, e.g.:
<?xml version="1.0" encoding="utf-8"?>
<n2svcd>
  ...
  <applications>
    ...
    <application name="<application name>" module="LhoSipApp">
      ...
      <config>
        ...
        <normalisation>
          <!-- Normalisation rules -->
        </normalisation>
        <denormalisation>
          <!-- Denormalisation rules -->
        </denormalisation>
      </config>
    </application>
    ...
  </application>
  ...
</n2svcd>
Configuration Details
Within each block, normalisation rules may be configured within specific sub-sections:
| Attribute | Type | Description | 
|---|---|---|
      .normalisation
     | 
    Object | 
      Container for calling and called party number normalisation rules for inbound INVITE messages.
     | 
  
      .called_party
     | 
    Array | 
      Array of normalisation rules for INVITE.called_party from Digits to normalised Digits.
     | 
  
      .rule
     | 
    Object | Provisions a called party normalisation rule. | 
      .calling_party
     | 
    Array | 
      Array of normalisation rules for INVITE.calling_party from Digits to normalised Digits.
     | 
  
      .rule
     | 
    Object | Provisions a calling party normalisation rule. | 
      .denormalisation
     | 
    Object | 
      Container for called and called party number denormalisation rules for outbound INVITE.
     | 
  
      .called_party
     | 
    Array | 
      Array of denormalisation rules for translating Digits. Applies to called_party in an outbound INVITE message.
     | 
  
      .rule
     | 
    Object | Provisions a called party denormalisation rule. | 
      .calling_party
     | 
    Array | 
      Array of denormalisation rules for translating Digits. Applies to calling_party in an outbound INVITE message.
     | 
  
      .rule
     | 
    Object | Provisions a calling party denormalisation rule. | 
Normalisation Rule
Each Normalisation Rule defines a rule for the normalisation of an inbound number.
For each inbound INVITE the relevant normalisation list is traversed until a matching rule is found.
That rule is then applied and no other rule will apply.
The following inbound numbers are normalised:
INVITE.called_party(called_partynormalisation rules)INVITE.calling_party(calling_partynormalisation rules)
Each rule object in the config.normalisation.called_party and config.normalisation.calling_party Array lists has the following structure.
| Attribute | Type | Description | 
|---|---|---|
      leading
     | 
    Hex Digits | 
      A prefix match string containing none or more characters from [0-9][a-f].An empty string matches all digits. The match is case-insensitive. A rule matches if leading matches.
      (Default = empty string).
     | 
  
      min_len
     | 
    Integer | 
      The minimum length of the digit string which this rule will match. (Default = same as the length of leading).
     | 
  
      max_len
     | 
    Integer | 
      The maximum length of the digit string which this rule will match. (Default = no maximum length, match all digit strings).  | 
  
      trim
     | 
    Integer | 
      The number of leading digits to trim when normalising. (Default = 0, do not trim).
     | 
  
      prepend
     | 
    Hex Digits | 
      The digit string to prepend (after trimming) when normalising. None or more characters from [0-9][a-f].(Default = do not prepend).  | 
  
Denormalisation Rule
Each Denormalisation Rule defines a rule for the denormalisation of an outbound calling or calling number.
For each outbound INVITE the relevant denormalisation list is traversed until a matching rule is found. That rule is applied. No other rule will apply.
The following outbound digits are denormalised (when not taken directly from INVITE fields):
INVITE.called_party(called_partydenormalisation rules)INVITE.calling_party(called_partydenormalisation rules)
Each rule object in the config.denormalisation.called_party and config.denormalisation.calling_party Array lists has the following structure.
| Attribute | Type | Description | 
|---|---|---|
      leading
     | 
    Hex Digits | 
      [Required] A prefix match string containing none or more characters from [0-9][a-f].An empty string matches all digits. The match is case-insensitive. A rule matches if leading matches.
     | 
  
      min_len
     | 
    Integer | 
      The minimum length of the digit string which this rule will match. (Default = same as the length of leading).
     | 
  
      max_len
     | 
    Integer | 
      The maximum length of the digit string which this rule will match. (Default = no maximum length, match all digit strings).  | 
  
      trim
     | 
    Integer | 
      The number of leading digits to trim when denormalising. (Default = 0, do not trim).
     | 
  
      prepend
     | 
    Hex Digits | 
      The digit string to prepend (after trimming) when denormalising. (Default = do not prepend).  |