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.