Sh Repository Configuration
When using the Sh protocol, the PCRF sends an Sh SNR. MATRIXX Engine assumes one active Sh subscription
per device, consisting of one Sh SNR per subscription (with the same Session-Id). If a
subscription is already active, a second Sh SNR for that same subscription is handled as a
duplicate of the original, while an SNR for a different subscription logs a warning and
replaces the current one. Re-using the Session-Id
of a currently-inactive
subscription activates a new subscription with that same ID.
If you normalize Sh components on the balance amount within a given range, remember that MATRIXX Engine does not send an Sh PNR when the balance amount is outside of that range.
Sh AVPs
Use the following Sh AVPs:
- User-Identity — With MSISDN and/or Public-Identity identifying the device, where Public-Identity must contain an IMSI.
- Session-Id — Identifying the subscription.
- Expiry-Time — Indicating the desired length of the subscription.
- Origin/Destination Host and Realm, to route the Sh SNA/PNR back to whoever sent the Sh SNR.
The server responds with an Sh SNA with AVP Result-Code of 2001 indicating success or another value indicating failure. On success, the Sh SNA contains the following additional AVPs:
- Expiry-Time, indicating the actual length of the subscription, which may be sooner than was requested. Optional. Used to limit the length of subscriptions for certain profiles. If left blank, then the length of the subscription is unlimited by default. Alternatively, the profile has no maximum expiration time.
- User-Data, containing an
<Sh-Data>
XML element with the requested RepositoryData.
- Global:Session:Repository:Notify:How many attempts? — Specifies how many notification attempts to get an answer.
- Global:Session:Repository:Notify:How long (in seconds) to wait after each attempt? — Sets a time interval, in seconds, to wait before sending another notification if the previous notification was not answered.
The first question asks how many tries before giving up, and the second one asks how long to wait between tries.
Sh MDC Field
The MtxDiamShSubscribeNotificationsMsg MDC includes a field called IsOneTimeProfileAvailable that can be used by Sh repository data components to decide whether to select one-time profiles for a device. At first, this field has a value 1, indicating that one-time profiles are available to be selected. After a one-time profile has been selected for the device, this field has a value of 0, indicating that one-time profiles are no longer available to be selected.
For example, suppose a subscriber owns an offer requiring them to be re-directed to a welcome page the first time they use the device. In this example, the first Sh SNR returns a redirection to the welcome page, with a maximum expiry time of five minutes after the Sh SNR is sent. This redirection occurs exactly once per device.
To implement this one-time re-direction, configure an Sh repository data profile with a
redirection to the welcome page and indicate that this profile is a one-time profile
with a five-minute maximum expiry time. The Sh repository data component normalizes
on the MtxDiamShSubscribeNotificationsMsg field
IsOneTimeProfileAvailable
to select the profile for value 1
(other possible values are skip for a value of 0). When a one-time profile is
selected, the device state is then updated and the
IsOneTimeProfileAvailable
field now has a value of 0 for each
subsequent Sh message for that device.
Behavior of the IsOneTimeProfileAvailable Field
By default, if a device has never selected a one-time profile, MATRIXX Engine assigns a value
of 1 to the MtxDiamShSubscriberMsg IsOneTimeProfileAvailable
field,
indicating that a one-time profile may be applied to the device. If a device has
already selected a one-time profile, MATRIXX Engine assigns a value of 0 to the IsOneTimeProfileAvailable
field,
indicating that a one-time profile may not be applied to a device again, as a
one-time profile has already been selected for the device in the past. To determine
whether to select a one-time profile for a device, normalize on the
IsOneTimeProfileAvailable
field.
Sh-Data XML Repository Data Computation
At the time of Sh SNR/PNR processing, Sh components are collected and applied from applicable devices, subscribers, groups, and global offers. Each component consists of rate tables that use normalizers to select one Sh profile or skip to the next rate table. Potentially using the same normalizers as a Gx or Sy policy component, the data component rate tables select a set of profiles that are valid at processing time.
Given this set of collected profiles, the RepositoryData items are combined into a list that is grouped by ServiceIndication. Within each group, those with identical ServiceData are merged, and the remainder are assigned a unique SequenceNumber value starting at 1.
Normally, Subscriber-management modification requests, such as offer purchase or device-field modification, elicit Gx/Gy RAR or Sy SNR. If the product is acting as both SPR and OCS with an active Sh subscription, it sends an Sh PNR but not an Sy SNR. Instead, this is expected to elicit an Sy SLR from the PCRF. If this occurs after the Sh subscription has expired, neither is sent.