Forum Discussion

Shay_Ben-David1's avatar
Shay_Ben-David1
Icon for Nimbostratus rankNimbostratus
Feb 26, 2009

Problem with an irule

i am having some problem with an irule that should update the timeout of the persist record based on a SIP method, the deletion of the persist based on the if argument is going OK, but the adding of the persist with different timeout is not:

 

 

when SIP_REQUEST {

 

if {[SIP::method] == "BYE"} {

 

session delete sip [SIP::call_id]

 

session add sip [SIP::call_id] 20

 

}

 

}

 

 

the session can be replaced with persist as well, and the same result is being shown.

 

thanks

 

4 Replies

  • What do you see if you run 'b persist all show all' for the corresponding record after adding the record from the iRule? Can you post an anonymised copy of your VIP and related profiles using 'b virtual VIRTUAL_NAME list' and 'b profile PROFILE_NAME list'?

     

     

    Thanks,

     

    Aaron
  • when BYE sent, the persist is removed and another one comes in place, but the timeout for this persist comes from the default profile (180 second) and not from the irule.

     

    virtual incoming-sip-v4 {

     

    pool server-v4-pool

     

    destination 10.106.1.1:5060

     

    ip protocol udp

     

    rules Incoming_SIP_ipv4

     

    profiles

     

    sip-v4

     

    sip_calls

     

    udp_ipv4_immediate

     

    persist sip-callid-v4

     

    }

     

    profile udp udp_ipv4_immediate {

     

    defaults from udp

     

    idle timeout immediate

     

    datagram lb enable

     

    allow payload disable

     

    }

     

    profile sip sip-v4 {

     

    defaults from sip

     

    terminate bye disable

     

    }

     

    profile stats sip_calls {

     

    defaults from stats

     

    field1 172.10.10.2

     

    field2 172.10.10.3

     

    field3 172.10.10.4

     

    }

     

    profile persist sip-callid-v4 {

     

    defaults from sip_info

     

    mode sip

     

    timeout 1800

     

    sip info "Call-ID"

     

    across services disable

     

    across virtuals enable

     

    across pools disable

     

    }
  • hi, i also try some irule exactly like this and found the same situation, where the persist timeout is being taken from the default profile and not from the irule, another thing that i notice is that the irule seems to work with the deletion of the persist when the "if" condition accure, so i also don't know why its not working, maybe someone from devcentral could help me understand this ?

     

     

     

    when SIP_REQUEST {

     

    if {[SIP::method] == "BYE"} {

     

    log.local0 "method: {[SIP::method] "

     

    persist delete sip [SIP::call_id]

     

    persist add sip [SIP::call_id]

     

    }

     

    }