Adaptation examples

Last Updated : Feb 01, 2017 |

Example 1

In the following example, an adaptation is needed for international calls for the AT&T service provider.
For incoming calls, AT&T sends the 11-digit local number in 1 NPA NXX XXXX format. To convert this number into E.164, Session Manager must add a plus sign (+), there by converting the number to +1 NPA NXX XXXX format. Specify the following values:
  • Matching pattern = 1
  • Min = 11
  • Max = 11
  • Phone-Context =
  • Delete Digits = 0
  • Insert Digits = +
  • Address to modify = both
For outgoing calls to AT&T, Session Manager must convert the E.164 form to a format that AT&T supports, either 1+10 digits for North America calls or 011+country code + number for international calls. For calls to North America, specify the following values:
  • Matching Pattern = +1
  • Min = 12
  • Max = 12
  • Phone-Context =
  • Delete Digits = 1
  • Insert Digits = <None>
  • Notes = Calls to North America
For calls to Germany, specify the following values:
  • Matching Pattern = +49
  • Min = 13
  • Max = 13
  • Delete Digits = 1
  • Insert Digits = 011
  • Address to modify = destination
  • Notes = Calls to Germany

Example 2

The following is an example of how to set up an adaptation with phone-context:
Ingress adaptation rule:
  • Matching pattern = 53
  • Min = 4
  • Max = 4
  • Phone-Context = site1
  • Delete Digits = 0
  • Insert Digits = 908
  • Address to modify = both
Egress adaptation rule:
  • Matching pattern = 908
  • Min = 7
  • Max = 7
  • Phone-Context = site1
  • Delete Digits = 3
  • Insert Digits =
  • Address to modify = both
Input (String prior to the adaptation processing)
Adaptation Processing
Output (String after the adaptation processing)
5335; phone-context = site1@avaya.com; user = phone
Ingress adaptation
9085335@avaya.com
9085335@avaya.com
Egress adaptation
5335; phone-context = site1@avaya.com; user = phone

Example 3

Session Manager supports phone-context with a global number prefix, the plus + sign. If the incoming request contains the phone-context parameter with a number starting with +, Session Manager prefixes the user part with the contents of the phone-context before invoking the routing lookup. Session Manager uses the resulting string for routing purposes only and does not modify the user part. The following examples illustrate this point:
R-URI
Ingress Adapter Rule
Resulting R-URI
Routing Notes
8885335;phone-context=+1303@avaya.com; user=phone 
Matching pattern: 888 Min: 7 Max: 7 Phone-Context: Delete Digits: 3 Insert Digits: 538 Address to modify: both
Note:
Phone-Context string is empty.
5385335;phone-context=+1303@avaya.com; user=phone 
Session Manager uses the string +13035385335@avaya.com for routing purposes.
5385335;phone-context=+1303@avaya.com; user=phone 
Matching pattern: 538 Min: 7 Max: 7 Phone-Context: +1303 Delete Digits: 0 Insert Digits: +1303 Address to modify: both
+13035385335@avaya.com 
Session Manager uses the string +13035385335@avaya.com for routing purposes.
In the first example (row 1), the phone-context is empty in the ingress adaptation rule. Because the adaptation rule requires matching on three fields (pattern, min and max), the incoming INVITE contains the phone-context parameter. If the phone-context field is empty, the match succeeds and the adaptation is applied. However, the adaptation does not change the phone-context parameter. This example also shows the backward-compatibility case where adaptation is applied on the user part without modifying the phone-context parameter. On receiving this INVITE, Session Manager performs routing lookup based on +13035383535 to determine the destination. Here, Session Manager only changes the phone number and not the phone-context parameter.
In the second example (row 2), the ingress adaptation rule contains +1303 in the phone-context field. Also, the incoming INVITE contains the phone-context parameter with value of +1303. Because the ingress adaptation rule requires matching all four fields, the match succeeds and the adaptation is applied, which changes the R-URI. On receiving this INVITE, Session Manager performs routing lookup based on the updated R-URI.