ltm rule command DIAMETER respond
iRule(1) BIG-IP TMSH Manual iRule(1)
DIAMETER::respond
Sends message to client or server (based on context).
SYNOPSIS
DIAMETER::respond DIAMETER_VERSION RFLAG_BINARY PFLAG_BINARY EFLAG_BINARY TFLAG_BINARY
DIAMETER_COMMAND_CODE APP_ID HOP_ID END_ID AVPS
DESCRIPTION
This iRule command creates and sends a new message to the client or server.
When called from clientside events, the new message is sent to the client. When called from serverside
events, the new message is sent to the server.
Syntax DIAMETER::respond "version" "rflag" "pflag" "eflag" "tflag" "command-code" "application-id" "hopid"
"endid" "payload"
Note: \'payload\' is the full payload of the message, as created by
concatenating multiple strings from \'DIAMETER::avp create\'.
RETURN VALUE
VALID DURING
DIAMETER_INGRESS, DIAMETER_EGRESS, DIAMETER_RETRANSMISSION, MR_INGRESS, MR_EGRESS, MR_FAILED
EXAMPLES
when DIAMETER_INGRESS {
# DIAMETER::avp create "avpname|code" "v" "m" "p" "vendorid" "data" "type"
# 2 = DO_NOT_WANT_TO_TALK_TO_YOU
set goaway [DIAMETER::avp create "disconnect-cause" 0 1 0 0 2 integer32]
set version 1
# 282 = Disconnect-Peer-Request
set code 282
set origin_host [DIAMETER::avp create "origin-host" 0 1 0 0 "bigip6.core.example.com" string]
set origin_realm [DIAMETER::avp create "origin-realm" 0 1 0 0 "example.com" string]
set appid 16777215
set hopid 999999
set endid 888888
DIAMETER::respond $version 1 0 0 0 $code $appid $hopid $endid $origin_host$origin_realm$goaway
DIAMETER::drop
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-11.0.0 --First introduced the command.
BIG-IP 2020-06-23 iRule(1)