ltm rule command SIP respondΒΆ

iRule(1)					  BIG-IP TMSH Manual					     iRule(1)

SIP::respond
       Terminates a SIP response and responds with one of your creation.

SYNOPSIS
       SIP::respond RESPONSE_CODE (PHRASE (HEADER_NAME HEADER_VALUE)*)?

DESCRIPTION
       This command allows you to terminate a SIP request and send a custom formatted response directly from the
       iRule.

       Syntax

       SIP::respond code <"phrase" <"header-name" "header-value"> >

	    * Terminate current SIP request, send back a response with code,
	      phrase and header-name header-value pairs

RETURN VALUE
VALID DURING
EXAMPLES
	when SIP_REQUEST {
	  log local0. [SIP::uri]
	  log local0. [SIP::header Via 0]
	  if {[SIP::method] == "INVITE"} {
	    SIP::respond 401 "no way" X-Header "xxx here"
	  }
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-9.2.0 --First introduced the command.

BIG-IP						      2020-06-23					     iRule(1)