Forum Discussion

nshelton85's avatar
nshelton85
Icon for Altostratus rankAltostratus
Nov 22, 2018

Traffic to virtual server fails when iRule is in place

I am having some issues with a simple iRule that I have been testing in my lab. I have a virtual server that has a pool with a single session border controller in it. When I attempt to connect to the virtual server traffic is not forwarded to the pool if the iRule is in place. If I remove the iRule, the phone will register and will stay registered when i put the iRule back on the virtual server. I am also having issues with triggering the second part of my iRule which is an if statement if {[SIP::method] == "INVITE"}. If I make a test call, I never see this part of the rule get logged.

when SIP_REQUEST {
set SRC_IP [clientside {IP::remote_addr}]
set SIPFrom [SIP::from]
set SIPTo [SIP::to]
set SIPMethod [SIP::method]

log local0. "Test message $SIPFrom $SIPTo $SIPMethod $SRC_IP"
if {$SIPMethod == "INVITE"}{
forward
log local0. "Test call from:$SIPFrom to:$SIPTo from IP $SRC_IP "
}
else {forward}
}