Moving Manipulation Rules

Users can move rules within any manipulation-rule container. Any manipulation rule which contains sub-rules will now offer the ACLI command move <from index> <to index>. For example, given the order and list of rules below:

1. rule1

2. rule2

3. rule3

4. rule4

Moving rule3 to position 1 can be achieved by executing move 3 1. The resulting order will then be: rule3, rule1, rule2, rule4. A move operation causes a shift (or insert before) for all other rules. If a rule from the top or middle moves to the bottom, all rules above the bottom are shifted up to the position of the rule that was moved. If a rule from the bottom or middle moves to the top, all rules below are shifted down up to the position of the rule that was moved. Positions start from 1.

A valid from-index and to-index are required to be supplied as arguments to the move action. If a user enters a range that is out of bounds for either the from-index or to-index, the ACLI will inform the user that the command failed to execute and for what reason.

With respect to the issue of creating an invalid sip-manipulation by incorrectly ordering the manipulation rules, this issue is handled by the Oracle® Enterprise Session Border Controller validating the rules at configuration time and treating them as invalid prior to runtime. This may or may not affect the outcome of the sip-manipulation as a configured rule may not perform any operation if it refers to a rule that has yet to be executed. It is now the user’s responsibility to reorder the remaining rules in order to make the sip-manipulation valid once again.

It is important to note that rules of a different type at the same level are all part of the same list. To clarify; header-rules, mime-rules, mime-isup-rules and mime-sdp-rules all share the same configuration level under sip-manipulation. When selecting a move from-index and to-index for a header-rule, one must take into consideration the location of all other rules at the same level, since the move is relative to all rules at that level, and not relative to the particular rule you have selected (for example, the header-rule).

Since the list of rules at any one level can be lengthy, the move command can be issued one argument at a time, providing the user with the ability to select indices. For instance, typing move without any arguments will present the user with the list of all the rules at that level. After selecting an appropriate index, the user is then prompted with a to-index location based on the same list provided.

For Example:

ORACLE(sip-mime-sdp-rules)# move
select a rule to move

1: msr sdp-type=any; action=none; match-value=; msg-type=any

2: addFoo header-name=Foo; action=none; match-value=; msg-type=any

3: addBar header-name=Bar; action=none; match-value=; msg-type=any

selection: 2
destination: 1
Rule moved from position 2 to position 1
ACMEPACKET(sip-mime-sdp-rules)#