For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

shaig_162391's avatar
shaig_162391
Icon for Nimbostratus rankNimbostratus
Jul 29, 2014

iRules with regex and multi pool

Hi,

 

I need to configure iRule when sip request is sent to VIP and the sip header contain the word "INVITE" send the traffic to pool x And when sip header contain the word " MESSAGE" send the traffic to pool y. I also need that this vip will answer to tcp & udp 5060 only .

 

Thanks Shai

 

1 Reply

  • The INVITE string is going to be a method, not a header, so per the SIP wiki section:

    https://devcentral.f5.com/wiki/iRules.SIP.ashx

    the following may work for that part:

    when SIP_REQUEST {
        if { [SIP::method] equals "INVITE" } {
            pool pool_x
        } 
    }
    

    I'm not a SIP expert by any means, but pouring through RFC3261, I don't see any specific method or request header that contains "MESSAGE" (other than a Content-Type header used to tunnel SIP traffic).

    As for the port, that is defined in the destination port section of the VIP itself.