SIP Recursion Policy

Session Agents (and Session agent groups) can utilize a SIP Recursion policy to customize the Oracle Communications Session Border Controller (OCSBC) behavior when recursing through a list of target SIP peers. These policies are useful for networks with large numbers of SIP peers that wish to customize recursive routing behavior for individual session agents or session agent groups, based on number of recursion attempts or the returned SIP response code.

SIP recursion policy provides the OCSBC with rules to indicate when to resend messages to the next SIP peer based on the previous response before terminating recursion and forwarding the final peer's response back to the initial requester.

The system terminates recursing among session agents (or session agent groups) when one of two criteria is first met. The first criteria is reaching a maximum number of recursions among all targets to a given SIP request for all configured response codes. The second criteria is receiving a maximum number of a configured response code from all targets as recursed for a given SIP request.

To set a maximum number of recursions before forwarding the final response back to the ingress-side requester, you set the sip-recursion-policy, global-count parameter and the desired response-codes. Once the OCSBC exceeds retrying to send a message to valid targets this number of times, it stops recursing and forwards the final response back to the requester. To disable maximum recursion hops per-call, set the sip-recursion-policy, global-count to 0.


This image depicts the OCSBC routing recursively via three session agents.

SIP recursion policy can also terminate recursion based on receiving one or more of the individually configured 3xx, 4xx, or 5xx response messages received from all targets in response to the request. The OCSBC can consider the number of responses per response code that were received before terminating recursion.

In absolute mode, the OCSBC stops recursing after the total configured number of responses (sip-response-code, attempts) for a configured sip-response-code subelement has been received. When the number of attempts per response code is received, recursion stops and the final response is forwarded to the requestor. Considering the previous call flow, in the following configuration example, after the OCSBC receives the 2nd 488 response from among all targets, it terminates recursion and forwards the last 488 to the requester:
sip-response-code
                response-code                           488
                attempts                                2

Consecutive mode sets the OCSBC to stop recursing after the total configured number of responses (sip-response-code, attempts) for a configured sip-response-code subelement has been received consecutively. When the number of attempts per response code is received, recursion stops and the final response is forwarded to the requestor. Considering the previous example's configuration set to consecutive mode, the OCSBC will need to receive two 488 responses in a row before recursion terminates and the last 488 is forwarded back to the requester.

Final Configuration

In order to use a sip-recursion-policy, it must be configured within a session agent or session agent group. Populate a session-agent-group, sip-recursion-policy or session-agent, sip-recursion-policy parameter with the name of the SIP recursion policy you wish to apply.

Feature Interactions

The existing SIP Configurable Route Recursion feature takes higher precedence than this feature. If the stop-recurse parameter is configured in the SIP interface, session agent, or SAG, the OCSBC checks each response against that list, before any SIP recursion policy.

SIP Recursion Policy Configuration

  1. Access the sip-recursion-policy configuration element.
    ORACLE# configure terminal
    ORACLE(configure)# session-router
    ORACLE(session-router)# sip-recursion-policy
    ORACLE(sip-recursion-policy)# 
  2. name - Set a name for this SIP Recursion Policy. This value will be referenced by individual session agents' or session agent groups' sip-recursion-policy parameter.
  3. description - Enter a textual description of this SIP Recursion Policy instance. If the description includes spaces, enclose all words within double quotes.
  4. global-count - Enter the maximum number of recursions to take before terminating recursion and sending the response back to the requester. Entering 0 here disables a maximum recursion counter.
  5. mode - If terminating recursion based on responses received, enter whether to terminate on absolute responses or consecutive responses. This value is set if also configuring sip-response-code subelements. Valid values are:
    • absolute
    • consecutive
  6. Type done to save your configuration.

If configuring the Oracle Communications Session Border Controller to terminate recursion on received response, continue this procedure to create one or more sip-response-code subelement.

  1. Access the sip-response-code subelement.
    ORACLE(sip-recursion-policy)# sip-resp-code-attempts
    ORACLE(sip-response-code)#
  2. response-code - Enter the SIP response code number to associate with an attempt number through this configuration element for when to terminate recursion.
    • Default: 503
    • Range: 300 - 599
  3. attempts - Enter the number of times the system must receive a message of the response-code before terminating recursion. This value is handled according to the sip-recursion-policy, mode parameter.
    • Default: 1
    • Range: 1 - 1000
  4. Type done to save your configuration.

Configure the appropriate session-agent, sip-recursion-policy or session-agent-group, sip-recursion-policy parameter with the name of the SIP Recursion policy you just created.