DIAMETER::persist

Description

This iRules command returns the persistence key being used for the current message. If new persist key is provided, the existing persistence key will be replaced. The value of the new key MUST be the value of a valid AVP in the message. An AVP attribute name should not be given as the new key value.
If bidirection is specified as false, disable(d), no, 0, or is unspecified, then persistence is not bidirectional. If bidirection is specified as true, enable(d), yes, or 1 this persistence entry is bidirectional.
If the “reset” sub-command is used, the persistence record associated with the current message will be removed.
When using this iRule command to set a persistence record, the associated diameter session profile must be configured with the attribute persist-type set to custom or else the iRule will fail.

Syntax

DIAMETER::persist [new-persist-key] [bidirection]
# v13+
DIAMETER::persist reset
# v14.1+
DIAMETER::persist bidirectional [boolean]
DIAMETER::persist bypass
DIAMETER::persist ignore
DIAMETER::persist replace
DIAMETER::persist timeout [value]
DIAMETER::persist use
# v16.0+
DIAMETER::persist direction <detect | forward | reverse>
DIAMETER::persist delete-none
DIAMETER::persist delete-on-success
DIAMETER::persist delete-on-failure
# v17.0+
DIAMETER::persist delete-on-any

DIAMETER::persist [new-persist-key] [bidirection]

  • Gets the persistence key for the current message.
  • If new-persist-key is provided, this sets the persistence key for the current message. Modifying the persistence key outside of DIAMETER_REQUEST or MR_INGRESS event has no effect of the persistence record used or modified when routing.
  • If new-persist-key and bi-direction are provided, this sets the persistence key for the current message. Modifying the persistence key outside of DIAMETER_INGRESS or MR_INGRESS event has no effect of the persistence record used or modified when routing.

DIAMETER::persist reset

  • Clear any persistence record stored under the current message’s persistence key.

DIAMETER::persist bidirectional [boolean]

  • Sets of gets the persistence keys bidirectional persistence flag.

DIAMETER::persist bypass

  • Route the message using the route table. On completion of routing, add a new persistence record if one does not exist. If an existing persistence record exists, it will be left unchanged.

DIAMETER::persist ignore

  • Route the message using the route table. The results of the routing will not be stored in the persistence table.

DIAMETER::persist replace

  • Route the message using the route table. On completion of routing, add a new persistence record if one does not exist. If an existing persistence record exists, replace the persistence record with the route selected.

DIAMETER::persist timeout [value]

  • Sets or gets the persistence key timeout value. Modifying the persistence key timeout outside of DIMETER_INGRESS or MR_INGRESS event has no effect on the persistence key timeout.

DIAMETER::persist use

  • Use the current persistence record for routing the message if present. If not present, route the message using the route table. On completion of routing, add a new persistence record if one does not exist. If an existing persistence record exists, replace the message’s selected route with the destination stored in the persistence entry.

DIAMETER::persist direction <detect | forward | reverse>

  • Sets of gets the persistence direction. If set to detect, the persist logic will determine if the message should be routed to the destination of the persist record or the source of the persist record. If set to forward, the message will be routed to the destination of the persistence record. If set to reverse, the message will be routed to the source of the persistence record.

DIAMETER::persist delete-none

  • Do not delete the persistence record automatically upon completion of the transaction. This is the default action.

DIAMETER::persist delete-on-success

  • The persistence record will be deleted upon successful completion of the transaction. The transaction complete delete action should be specified when processing an answer response message.

DIAMETER::persist delete-on-failure

  • The persistence record will be deleted upon unsuccessful completion of the transaction. The transaction complete delete action should be specified when processing an answer response message.

DIAMETER::persist delete-on-any

  • The persistence record will be deleted upon completion of the transaction. The transaction complete delete action should be specified when processing an answer response message.

Examples

when DIAMETER_INGRESS {
  log local0. "Received a DIAMETER message, persistence key is [DIAMETER::persist]"
}