iRules - Matching multiple entries and making decision FIFO basis
Need your advise regarding an iRule modification I am looking into. The present iRule logic in place checks for "AMR-WB" in the SIP payload and directs to PoolA and all remaining requests including "AMR" go to PoolB. However some traffic being received has a combination of both and customer wants the pool decision to be made based on the very first occurrence of either AMR or AMR-WB.
when SIP_REQUEST { if {[active_members PoolA ] != 0 and [active_members PoolB ] != 0}{ log local0. "AMR - Primary Site" if {[SIP::method] eq "INVITE" } { log local0. "AMR SIP Payload [SIP::payload]" if { [SIP::payload] contains "AMR-WB"} { log local0. "AMR WB found in Payload" pool PoolA } else { pool PoolB }
} else { pool PoolB } ---> Default
Could you suggest a way to check both in the payload and make pool decision based on which occurs first.