Introduction
This document describes how to use the Final Unit Indication (FUI) redirect feature on the Online Charging System (OCS) in order to configure automatic URL redirects for mobile subscribers whose quota is exhausted.
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics before you attempt the configuration that is described in this document:
- Gateway General Packet Radio Service (GPRS) Support Node (GGSN) Enhanced Charging System (ECS)
- Gy OCS
Components Used
The information in this document is based on these software and hardware versions:
- Cisco 5000 and 5500 Series Aggregated Services Routers (ASRs) Versions 14.0 and later
- Any OCS that supports the FUI Redirect feature
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Configure
Customers are required to enable the URL Redirection feature when subscriber quotas become exhausted. This implies that when the subscriber quota is exhausted, it should be redirected to a pre-configured URL where they can recharge their account.
The OCS sends the FUI redirect information in one of the Diameter Attribute Value Pair (AVP) in the Credit Control Answer-Update (CCA-U) message. The FUI redirect information (when the feature is enabled at the OCS) is normally received when the OCS wants to indicate to the GGSN that this is the last allocated unit before the subscriber quota is exhausted.
The GGSN (ASR 5x00) must be configured appropriately in order to handle the FUI redirect parameters that are received from the OCS, as described in the sections that follow.
Network Diagram
Configurations
Note: In this configuration example, by default, all of the traffic hits the IP-ANY rule definition and a content-ID (or Rating Group (RG)) value of 1 is applied to all of the traffic.
After quota exhaustion, the OCS provides a redirect URL in this format:
http://x.x.x.x:yy/
When the user begins to send traffic to the redirected URL, it hits the redirect1 rule definition and a content-ID value of 10 is applied to the redirected traffic.
Note: This particular content-ID (RG-10) should be free from the OCS-end in order to allow the user to access the redirected website, where the account can be recharged.
Here is an example:
active-charging service ECS
ruledef IP-ANY
ip any-match = TRUE
ruledef redirect1
http url starts-with http://x.x.x.x:yy/
charging-action default
content-id 1
cca charging credit
charging-action redirect1
content-id 10
cca charging credit
rulebase DCCA
action priority 100 ruledef redirect1 charging-action redirect1
action priority 65000 ruledef IP-ANY charging-action default
Note: Only the bare minimum configurations are described in this example. Actual production network configurations might have additional parameters configured, as per the solution.
Tip: The redirected URL can also be a Canonical Domain name, such as http://redirect.com. Refer to the next section for this particular scenario.
Redirect-Server-Address AVP Value as a Canonical Domain Name
If you must use a domain name for the redirect URL (http://redirect.com), the subscriber first sends a DNS query in order to resolve the domain name. In this case, the DNS resolution must be allowed for the subscribers. Use one of these two options in order to allow DNS resolution for the subscribers:
- Allow all DNS traffic without pass-through to the quota server.
- Use a different content-ID for the DNS traffic, and the OCS should grant some quota for DNS resolution to be successful (even after the quota is exhausted).
Verify
In order to verify that your configuration works properly, enter these show commands:
show active-charging sessions full imsi xxxx
show subscriber full imsi xxxx
Here is a clipped example output from the show active-charging sessions full imsi xxxx command before the quota is exhausted:
When the redirected URL is used, the output should appear similar to this:
Note: These examples only illustrate sample outputs, and the actual statistical values might differ.
In the output of the show subscribers full imsi xxxx command, the input pkts dropped should be 0:
A non-zero dropped packets value indicates that the packets are dropped after quota exhaustion without proper URL redirection.
Troubleshoot
Enter these commands into the CLI in order to troubleshoot your configuration:
monitor subscriber imsi xxxx
show subscribers full imsi xxxx
show active-charging sessions full imsi xxxx
Use the monitor subscriber imsi xxxx trace with Options A, 19, 34, and Verbosity 5 in order to verify whether the FUI redirect parameters in the required format are received from the OCS upon quota exhaustion.
Note: Option 34 is important with attempts to verify the data that moves into and out of the Active Charging Service (ACS).
These are the expected parameters in the CCA-U message that is received from the OCS:
- The DIAMETER_LIMITED_SUCCESS (2002) message is received at the Command level.
- The DIAMETER_SUCCESS (2001) message is received at the MSCC level.
- The Final-Unit-Indication AVP is present with proper redirect URL parameters.
Here is an example:
INBOUND>>>>> 15:59:52:587 Eventid:81991(5)
Diameter message from 1.1.1.1:3868 to 2.2.2.2:47552
Base Header Information:
Version: 0x01 (1)
Message Length: 0x000170 (368)
Command Flags: 0x40 (64) PXY
Command Code: 0x000110 (272) Credit-Control-Answer
Application ID: 0x00000004 (4) Credit-Control
Hop2Hop-ID: 0xadb045fa (2914010618)
End2End-ID: 0x05620b50 (90311504)
AVP Information:
—<Output Clipped>—
[M] Result-Code
Code: 0x0000010c (268) Result-Code
Flags: 0x40 (64) [M]
Length: 0x00000c (12)
: DIAMETER_LIMITED_SUCCESS (2002) >>>> Command Level Result Code
[M] CC-Request-Type
Code: 0x000001a0 (416) CC-Request-Type
Flags: 0x40 (64) [M]
Length: 0x00000c (12)
: UPDATE_REQUEST (2)
—<Output Clipped>—
[M] CC-Request-Number
Code: 0x0000019f (415) CC-Request-Number
Flags: 0x40 (64) [M]
Length: 0x00000c (12)
: 1
—<Output Clipped>—
[M] Multiple-Services-Credit-Control
Code: 0x000001c8 (456) Multiple-Services-Credit-Control
Flags: 0x40 (64) [M]
Length: 0x0000a8 (168)
[M] Rating-Group
Code: 0x000001b0 (432) Rating-Group
Flags: 0x40 (64) [M]
Length: 0x00000c (12)
: 1
[M] Granted-Service-Unit
Code: 0x000001af (431) Granted-Service-Unit
Flags: 0x40 (64) [M]
Length: 0x000018 (24)
[M] CC-Total-Octets
Code: 0x000001a5 (421) CC-Total-Octets
Flags: 0x40 (64) [M]
Length: 0x000010 (16)
: 1206114
[M] Result-Code
Code: 0x0000010c (268) Result-Code
Flags: 0x40 (64) [M]
Length: 0x00000c (12)
: DIAMETER_SUCCESS (2001) >>>> MSCC Level Result Code
[M] Final-Unit-Indication
Code: 0x000001ae (430) Final-Unit-Indication
Flags: 0x40 (64) [M]
Length: 0x000044 (68)
[M] Final-Unit-Action
Code: 0x000001c1 (449) Final-Unit-Action
Flags: 0x40 (64) [M]
Length: 0x00000c (12)
: REDIRECT (1)
[M] Redirect-Server
Code: 0x000001b2 (434) Redirect-Server
Flags: 0x40 (64) [M]
Length: 0x000030 (48)
[M] Redirect-Address-Type
Code: 0x000001b1 (433) Redirect-Address-Type
Flags: 0x40 (64) [M]
Length: 0x00000c (12)
: URL (2)
[M] Redirect-Server-Address
Code: 0x000001b3 (435) Redirect-Server-Address
Flags: 0x40 (64) [M]
Length: 0x00001c (28)
: http://x.x.x.x:yy
The redirected URL should be an IP address with or without a port number (http://x.x.x.x:yy) for this example, which directs the subscriber to the recharge page. The redirected URL can also appear as http://x.x.x.x. The previous example works for this case.