SIP::persist

Description

The SIP::persist command returns the persistence key being used for the current message. If new-persist-key is provided, the existing persistence key is replaced. The value of the new-persist-key MUST be one of valid header value in the message. A header name should not be given as the new-persist-key value.

Syntax

SIP::persist [new-persist-key]

# Introduced in v13.0.0.
# These subcommands are also backported to v11.6.3+ and 12.1.2+
SIP::persist reset
SIP::persist use
SIP::persist ignore
SIP::persist bypass
SIP::persist replace

# introduced in v13.1.0
# These subcommands have not been backported to earlier versions
SIP::persist timeout
SIP::persist bidirectional

# introduced in v16.0.0
SIP::persist direction <detect | forward | reverse>

SIP::persist

  • Gets the persistence key for the current message.

SIP::persist reset

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

SIP::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.

SIP::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.

SIP::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.

SIP::persist ignore

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

SIP::persist timeout <value>

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

SIP::persist bidirectional [boolean]

  • Sets of gets the persistence keys bidirectional persistence flag.

SIP::persist [PERSIST_KEY]

  • Sets the persistence key for the current message. Modifying the persistence key outside of SIP_REQUEST or MR_INGRESS event has no effect of the persistence record used or modified when routing.

SIP::persist <PERSIST_KEY> [value]

  • Sets the persistence key and if the second argument is present, its value set the persistence key timeout value. Modifying the persistence key outside of SIP_REQUEST or MR_INGRESS event has no effect of the persistence record used or modified when routing.

SIP::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.

Examples

when SIP_REQUEST {
    SIP::persist "[SIP::uri]-[SIP::from]-[SIP::to]"
}