How to use Response Header Definition?
In the Deploy Patterns, if a variable has the prefix “_” then it is treated as a SIP header which should be inserted in a response packet.
Note:
The Response Header Definition doesn’t allow to set “Server” and “User-Agent” headers.
- Sample-1: insert “Supported” header into the initial INVITE’s response.
---------------------------- [Matching Patterns:] $request = ^INVITE [Deploy Patterns:] _Supported = timer $continue = true ----------------------------
- Sample-2: insert “Retry-After” header in the response “504 Server Time out”.
---------------------------- [Matching Patterns:] $request = ^INVITE [Deploy Patterns:] _Retry-After = 300 $action = 504 ----------------------------
- Sample-3: insert “Organization” header in the REGISTER’s response
---------------------------- [Matching Patterns:] $request = ^REGISTER [Deploy Patterns:] _Organization = Brekeke $action = register ----------------------------