Routing Properties
You can configure the routes that define the URLs that CHF Proxy exposes and the rules for selecting the URL endpoints.
General Routing Properties describes the general routing properties:
Name | Description |
---|---|
routes.routename.urls | A list of the URLs that the route listens on, for example:
|
routes.routename.extractedFields | A map of the fields to be extracted to determine the endpoint to
which the request is forwarded, for
example:
|
routes.routename.routingRules | A list of the rules to compare with the extracted fields to determine the endpoint to which the request is forwarded, for
example:
|
routes.routename.defaultEndpoint | The name of the endpoint, for example, chf-two , to which to send the incoming request if none of the rules match. If this property is not specified,
a 404 error is returned in the event of no match. |
routes.routename.locationHeader.pattern | The pattern to use to create the location HTTP header in the response, for example: "%s/nchf-convergedcharging/v2/chargingdata/%s/%s" . The pattern
must contain three %s placeholders:
Specify this property only if the downstream Charging Function (CHF) provides a location header. |
routes.routename.locationHeader.strategy | The strategy to use to create a location header. The options are:
PROPAGATE . |
routes.routename.callbackUrlJsonPaths | A list of JSON paths that identify callback URLs. These values
are rewritten in the message that is sent downstream. The original
value is encoded into a URL that points to the callback checkpoint
of the CHF Proxy. The default value is notifyUri . |
A route can define fields to extract from the incoming request to be used in routing rules. These values can be extracted from the message body, URL, or header. Extracted Fields Properties describes the extracted fields properties:
Name | Description |
---|---|
From URL | |
routes.routename.extractedFields.fieldname.fromUrl.regex | The regular expression to use to extract the value from the URL to extract the specified value from IMSI messages, for example, regex:
"^imsi\\-(?<value>[0-9]{1,15})$" . |
routes.routename.extractedFields.fieldname.fromUrl.groupName | The name of the group to take the field from if you are using a
regular expression that defines named groups. The default value is
the value of the fromUrl.defaultValue
property. |
routes.routename.extractedFields.fieldname.fromUrl.defaultValue | The default value to use if the regular expression does not find a match. |
From Header | |
routes.routename.extractedFields.fieldname.fromHeader.headerName | The name of the HTTP header to take the value from, for example:
|
routes.routename.extractedFields.fieldname.fromHeader.regex | A regular expression to use to extract the value from the header (if needed). |
routes.routename.extractedFields.fieldname.fromHeader.groupName | The name of the group from which to take the value if you are
using a regular expression that defines named groups. The default
value is the value of the fromHeader.defaultValue
property. |
routes.routename.extractedFields.fieldname.fromHeader.defaultValue | The default value to use if the header does not exist or the regular expression does not find a match. |
From Message | |
routes.routename.extractedFields.fieldname.fromMessage.jsonPath | A JSON path expression that selects a field from the message
body, for example,
|
routes.routename.extractedFields.fieldname.fromMessage.regex | A regular expression to use to extract the value from the path value (if needed) to extract the specified values from NAI messages, for example,
. |
routes.routename.extractedFields.fieldname.fromMessage.groupName | The name of the group to take the field value from if you are
using a regular expression that defines named groups. The default
value is the value of the fromMessage.defaultValue
property. |
routes.routename.extractedFields.fieldname.fromMessage.defaultValue | The default value to use if the path does not exist or the regular expression does not find a match. |
Each route can have one or more routing rules that compare extracted fields with some conditions. The first rule that matches defines the endpoint to which the message is forwarded.
Routing Rule Properties describes the extracted fields properties:
Name | Description |
---|---|
routes.routename.routingRulesx.fieldValueMatchingRules | A list of rules that causes the message to be routed to the
endpoint if they all match, for
example:
|
routes.routename.routingRulesx.targetEndpoint | The endpoint to which the incoming message is forwarded if the
rule matches, for example, - targetEndpoint:
chf-one . |
routes.routename.routingRulesx.fieldValueMatchingRulesn.mathes.regex | The regular expression that the field value must match. |
routes.routename.routingRulesx.fieldValueMatchingRulesn.lower | The field value must be greater than or equal to this value. The default value is 0. This property is used with the upper property to define a
between rule for matching and routing messages, for example:
|
routes.routename.routingRulesx.fieldValueMatchingRulesn.upper | The field value must be less than or equal to this value. The default value is 231-1 (the Java maximum integer). This property is used with the lower
property to define a between for matching and routing messages. |