The XML schema conditions-1.6.xsd defines the testable conditions offered by the SIS. The following tables list the basic conditions, what they compare, and when they evaluate to true or false.

present

Description

Determines if a variable is present in the current request. This condition expects a variable as its parameter, including any surrounding curly braces ${}.

Returns

true if the specified variable exists in the current request

Examples

<present variable="${initial-dp.arg.calling-party-number}"/>
in present
<present variable="${to.uri.user}"/>
sip present

equal

Description

Compares two numeric values. Values may be specified either as element attributes or as nested elements. Nested elements may also be string manipulation functions. If the first value refers to a variable with named values, the second value may be specified in terms of those named values.

Returns

  • true if both values exist and are equal

  • false if either value refers to a variable that does not exist

Examples

<equal a="${initial-dp.arg.event-type-bcsm}" b="collectedInfo"/>
in equal
<equal>
    <value value="${from.uri}"/>
    <value value="sip:alice@foo.com"/>
</equal>
sip equal

not-equal

Description

Equivalent to <not><equal /></not>.

Returns

the inverse of the equivalent <equal> condition

Note This condition will still return true in the case where either value refers to a variable that does not exist such that equality cannot be determined.

Example

<not-equal a="${initial-dp.arg.service-key}" b="50"/>
in not equal

less-than

Description

Compares two numerical values for relative difference. Values may be specified either as element attributes or as nested elements. Nested elements may also be string manipulation functions. If the first value refers to a variable with named values, the second value may be specified in terms of those named values.

Returns

  • true if the first value is less than the second value

  • false if either value refers to a variable that does not exist or is not numeric

Examples

<less-than a="${initial-dp.arg.event-type-bcsm}" b="termAttemptAuthorized"/>
in lessthan
<less-than>
    <string-length source="${from.uri.user}"/>
    <value value="10"/>
</less-than>
sip lessthan

greater-than

Description

Compares two numerical values for relative difference. Values may be specified either as element attributes or as nested elements. Nested elements may also be string manipulation functions. If the first value refers to a variable with named values, the second value may be specified in terms of those named values.

Returns

  • true if the first value is greater than than the second value

  • false if either value refers to a variable that does not exist or is not numeric

Example

<greater-than a="${from.uri.port}" b="1023"/>
sip greater than

macro-satisfied

Description

Evaluates the specified macro and returns the result.

Returns

the result of evaluating the given macro, true or false

Example

<macro-satisfied macro="foo"/>
macro

true

Description

Unconditionally returns true.

Returns

true

Example

<true/>
true

false

Description

Unconditionally returns false.

Returns

false

Example

<false/>
false

assign

Description

Assigns a value to a variable. Can be used to create new user-defined variables. This condition expects a variable name as its parameter, including any surrounding curly braces ${}. Variables may be assigned a literal constant value, or may take their value from any other variable. The value may be specified either as an element attribute or as a nested element. Nested elements may also be string manipulation functions or compound datatypes.

Returns

  • true if the variable was successfully assigned

  • false if the source value refers to a variable that does not exist or a function that returns no value, or if the target variable does not exist and is not a user-defined variable or cannot be assigned for other reasons (for example, attempting to assign a string value to an integer-type variable)

Examples

<assign toVariable="${to.uri.user}" value="bob"/>
sip assign
<assign toVariable="${initial-dp.arg.called-party-number}">
    <called-party-number
        noa="national"
        numbering-plan="isdn"
        allow-inn-routing="true"
        address="1234567890"/>
</assign>

delete

Description

Deletes a variable. Can be use to remove headers from a SIP message or to delete previously created user-defined variables. This condition expects a variable name as its parameter, including any surrounding curly braces ${}.

Returns

true if the variable was successfully deleted

Example

<delete variable="${to.uri.user}"/>
sip delete
Previous page Next page