A SigMa script consists of one or more Within Session statements. Each statement represents transformations to be applied to signaling messages in a given session. A Session is defined as a SIP dialog and has the same lifetime as that of a dialog. These transformations can be applied on any given header including SDP elements. The transformations also include addition and deletion of headers, not just the ability to update the headers.
There are two types of Within session statements:
Generic: within session “all”, which applies the transformation to all dialogs.
Specific to a dialog: within session “invite”, which applies the transformation to the specified dialog. In this example, for the “invite” dialog.