Forum Discussion
ashley_sauls_67
Mar 23, 2007Historic F5 Account
persistance on sip traffic fails when the bye message comes
So we’re giving it a shot on 9.4
some bug near elseif that I could not work out caused me to break it into 2 separate rules
sipRule_1
when SIP_REQUEST {
set method [SIP::method]
log local0.info $method
if {$method=="REQUEST" || $method=="INVITE"}
{ persist sip [SIP::call_id] }
}
sipRule_2
when SIP_REQUEST {
set method [SIP::method]
log local0.info $method
if {$method=="BYE"}
{ persist sip delete [SIP::call_id] }
}
I'm attempting to get that irule working and get errors in the ltm log. Here's what I see:
Mar 23 05:48:22 tmm tmm[1421]: Rule sipRule_1 : INVITE
Mar 23 05:48:22 tmm tmm[1421]: Rule sipRule_2 : INVITE
Mar 23 05:48:22 tmm tmm[1421]: Rule sipRule_1 : ACK
Mar 23 05:48:22 tmm tmm[1421]: Rule sipRule_2 : ACK
Mar 23 05:48:36 tmm tmm[1421]: Rule sipRule_1 : BYE
Mar 23 05:48:36 tmm tmm[1421]: Rule sipRule_2 : BYE
Mar 23 05:48:36 tmm tmm[1421]: 01220001:3: TCL error: Rule sipRule_2 - expected integer but got "68980bba33a67f54f84673387efd6e08@64.192.112.13" while executing "persist sip delete [SIP::call_id] "
Is this a bug in the persist sip delete? It seems you’d have to pass a sip call_id…
?
thanks in advance for any help
ashley-
6 Replies
- ashley_sauls_67Historic F5 AccountI think I have the answer… it may be use SIP_REQUEST_SEND instead of SIP_REQUEST
- ashley_sauls_67Historic F5 Accountor is it because I need to Gulp instead of SIP? *lol*
- Stephen_Briggs
Employee
We tried it with SIP_REQUEST_SEND and are still getting the same error - Colin_Walker_12Historic F5 AccountFirst of all, let's try and put this back into a single rule for clarity's sake. Second, let's add a little logic to make sure that we're trying to delete a persistence record that actually exists. Lastly, let's be sure we're using a valid persistence method to start with (uie rather than sip).
In the end, I think you'll end up with something close to:when SIP_REQUEST { set method [string tolower [SIP::method] ] log local0.info "SIP Method is: $method" if { ($method equals "request") or ($method equals "invite") } { persist uie [SIP::call_id] } elseif { $method equals "bye" } { if { [string length [persist lookup uie [SIP::call_id] node] ] > 0 } { persist delete uie [SIP::call_id] } } }
HTH,
Colin - Raymond_Feng_97Historic F5 AccountI think the most likely problem is two:
1> we should do persist delete only on the server response or server forwarding bye messege
2> supposed this is one three client conference call through SIP, so that is hard for us to delete persist when one client exit. - Shay_Ben-David1
Nimbostratus
i used the same irule:
when SIP_REQUEST {
set method [string tolower [SIP::method] ]
log local0.info "SIP Method is: $method"
if { ($method equals "request") or ($method equals "invite") } {
return
} elseif { $method equals "BYE" } {
if { [string length [persist lookup uie [SIP::call_id] node] ] > 0 } {
persist uie [SIP::call_id] 5
}
}
}
only i am updating the persist table when BYE is sent, but i have another irule for the incoming who sent the returning SIP connection to the correct originate server from inside:
when SIP_REQUEST {
pool mypool
set id "[persist lookup sip [SIP::call_id]]"
log local0.alert "ID found in lookup is: $id"
if { [llength $id] } {
log local0.alert "In if select pool"
return
}
set id "[SIP::call_id] any virtual"
set sessionInfo [session lookup uie $id]
log local0.alert "Session information found is: $sessionInfo"
if { [llength $sessionInfo] } {
log local0.alert "Choosing member acording to session info"
pool mypool member $sessionInfo
}
}
Problem is that only one BYE is being forward to one server, other BYE that belong to the next server that originate SIP session is being sent to the LTM but does not forward to the server.
help would be appreciated here.
Thanks
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
