$body
Match in the message body such as SDP and get the matched string.
Syntax:
$body( regex )
Parameters:
regex – a regular expression pattern. It should contain a pair of parenthese for defining the matched string
Returns:
the matched string
Version Since:
2.0
Where the function can be used:
- Preliminary rules
- Regular rules
Example:
$body("m=audio (.+) RTP/AVP") = ^2000$
If the audio RTP port is 2000.
$body("(m=video)") = .+
If the SDP indicate Video.