Session statement

Last Updated : Nov 20, 2017 |
This session statement has three parts: Method, Where Clause, and Code Block.
within session "<method>" where <condition> { <codeblock> }
  • Method: Where you specify the SIP request method that starts the session.

  • Where Clause: Where you specify the Session selection criteria on top of the Method for which the Code Block must be executed. The Session selection criteria can be augmented using AND / OR conjunctions.

    The variables that can be used within the Where Clause are given in the table: Where Clause Variables.

  • Code Block: Where the operations are written and encapsulated with a set of braces {}. The operations might include further selection criteria and actual operations on headers themselves.

    Three different statements can be written within the code block:

    • act on message where <extra criteria> { <code> } – Tells the interpreter to run the given code on all messages within the SigMa session that match the criteria.

    • act on request where <extra criteria> { <code> } – Tells the SigMa interpreter to run the given code on all request messages within the session that match the criteria.

    • act on response where <extra criteria> { <code> } – Tells the interpreter to run the given code on all response messages within the session that match the criteria.

Note:

Many of the above statements can be written in a given session code block as needed for a given script.