Use the subexpression builder to build complex rule conditions from subexpressions by using AND, OR, NOT and parenthetical grouping. The rule builder validates the rule when you apply the changes, and alerts you to mismatched parentheses, and unsupported logic operators.
To view this administrative console page, click
.To modify rules with the rule builder, you must have administrator administrative privileges.
Depending on the protocol you select, different operands are displayed. The following table includes the operand names as displayed in the console, the actual operand as it will appear in the expression, the valid protocols per operand, and the description for each operand.
Operand | Syntax | Description |
---|---|---|
SIP method | request.method | The SIP method for the request. Possible values are INVITE, TRYING, RINGING, ACK, OK, and BYE. If the message is not a request, this operand returns null. |
SIP response code | response.code | The response code of the response. If the message is not a response, this operand returns -1. |
Scheme of To header | to.uri.scheme | The scheme of the To header field. |
Scheme of URI | request.uri.scheme | The scheme of the URI. |
Scheme of From header | request.from.uri.scheme | The scheme of the From header field. |
Request URI | request.uri | The request URI. |
To URI | request.to.uri | The URI of the To header field. |
From URI | request.from.uri | The URI of the From header field. |
From header | request.from | The From header field. |
To header | request.to | The To header field. |
To header display name | request.to.display-name | The display name in the To header field. |
From header display name | request.from.display-name | The display name in the From header field. |
To URI host | request.to.uri.host | The port in the URI of the To header field. |
Server host | serverhost | The fully-qualified host name of the server. This operand does not support numeric operators such as >, >=, <, <=. |
Port | port | The listening port on which the request was received. |
Contact header | request.contact | The Contact header field. |
Contact URI | request.contact.uri | The URI of the Contact header field. |
Client host | clienthost | The fully-qualified client host name. This is the value of the internet protocol (IP) command host name. This operand does not support numeric operators such as >, >=, <, <=. |
clientipv4 | clientipv4 | The IP address of the client computer using the Internet Protocol version 4 (IPv4) dotted quad address type n.n.n.n. |
clientipv6 | clientipv6 | The Internet Protocol version 6 (IPv6) 128-bit address type of x:x:x:x:x:x:x:x following Request for Comments 1924 (RFC 1924) of the client computer. |
serveripv4 | serveripv4 | The IP address of the server computer using the IPv4 dotted quad address type n.n.n.n. |
serveripv6 | serveripv6 | The IPv6 128-bit address type of x:x:x:x:x:x:x:x following RFC 1924 of the server computer. |
Request transport | request.transport | The transport of the request. |
Request URI user | request.uri.user | The user in the request URI. |
From URI user | request.from.uri.user | The user in the From header field. |
To URI user | request.to.uri.user | The user in the To header field. |
Request URI host | request.uri.host | The host in the request URI. |
From URI host | request.from.uri.host | The host in the From header field. |
Request URI port | request.uri.port | The port in the request URI. |
From URI port | request.from.uri.port | The port in the URI of the From header field. |
To URI host | request.to.uri.host | The host in the To header field. |
Header name | header $<name> | A header name and value. For example, the expression header$Host='localhost' tests
a request to see if it contains an HTTP host header with a value of localhost.
To test for presence or absence of the host header, use one of the
following expressions:
|
Time | time | This operand is used to define the date and time of day that a given request must be honored. Two optional fields are StartTime and EndTime. If a request is received outside of that defined window, the request will not be processed. The Start Time and End Time fields each have the following format: dayOfWeek/dayOfMonth/month/year::hour:minute:second. For example, Thursday, the 11th of April, year 2007 at 1:03:45 PM is specified as: Thu/11/Apr/2007::13:03:45 Any field can use a wild card with the value *. For example, the 1st of each month is specified as */1. The dayofWeek values are Sun, Mon, Tue, Wed, Thu, Fri, Sat, and the dayOfMonth values range from 1-31. The month value is a non-numeric value representing the twelve months: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec. The year value is comprised of the year's four digits. For example, 2007. The hour value is the hour of day in the 24-hour clock. For example, 8am is represented as ::8. The minute and second are integers ranging from 0-59. The forward slash (/) is used to separate date parameters, the double colon (::) is used to separate the date and time values, and the colon (:) is used to separate the time of day parameters. Note that it is the boolean result of the entire rule in which the time operand is used that determines the routing action taken. |
Percentage | percentage$<val> | The percentage operand evaluates to true, a fixed percentage of the time. For example, percentage$50 evaluates to true on average 50% of the time. |
Ramp up | rampup$<startTime> $<completionTime> |
The rampup operand evaluates
to true a variable percentage of the time. It always
evaluates to false before <startTime> and
to true after <completionTime>.
As time progresses from <startTime> to <completionTime>,
it evaluates to true, a linearly increasing percentage. The format of <startTime> and <completionTime> is day/month/year::hour:min:sec. where day is the day of the month, month is one of the 12 months: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, year is the 4-digit year, hour is the 2-digit hour of the 24 hour clock, and min and sec are 2-digit values for minute and second, respectively.For example, rampup$01/Jan/2007::08:00:00$01/Jan/2007::17:00:00 begins to occasionally evaluate to true at 8 AM on Jan 1, 2007 and always evaluates to true by ramp up completion time at 5 PM of the same day. |
Operator | Description |
---|---|
Equals Ignore Case (EQUALSIGNORECASE) | Equals ignore case operator. The case of the strings is ignored. 'ABC' EQUALSIGNORECASE 'abc' is true. ('ABC' = 'abc') is false. |
Not Equals (< >) | The not equal operator expresses that the operand value is not equal to the value you enter. |
In (IN) |
|
Like (LIKE) | Expresses pattern matching for string operand values. The value must contain the wildcard character (%) in the position where the pattern matching is expected to start. For
example, the expression:
host LIKE %blancamatches the word blanca and any other word that ends in blanca, while the expression: host LIKE blanca%matches the word blanca and any other word that starts with blanca. The expression: host LIKE %blanca%matches the word blanca and any word that has the token blanca embedded in it. |
Like Ignore Case (LIKEIGNORECASE) | This operator expresses pattern matching for string operand values. The case of the strings is ignored. |
Is Not Null (IS NOT NULL) | A validation of the query shows that the requested parameter exists. |
Concatenate (+) | This operator evaluates 'abc'+'def' to 'abcdef'. |
Like In (LIKEIN) | This operator expresses string likein (string1, string2, string3,...) evaluates to true if the string to the left of likein matches one or more of the strings (stringN). |
Is Null (IS NULL) | A validation of the query shows that the requested parameter does not exist. Tests for an operand that has a NULL value. |
Equals ( = ) | The equality operator expresses a match in case-sensitive match. |
Greater Than (>) | Evaluates to the standard logical result. |
Greater Than or Equals (>=) | Evaluates to the standard logical result. |
Less Than (<) | Evaluates to the standard logical result. |
Less Than or Equals (<=) | Evaluates to the standard logical result. |
Between (BETWEEN) | Used with AND to select a range of values inclusive of the first (low) value and the last (high) value. Together, they operate on numbers and dates values. |
Depending on the operator that you choose, type in a value for the subexpression that you are choosing to create.
Generate the subexpression as a result of the operand, operator, and values that you have specified.
Click to append to the box on the rules panel.