Forum Discussion
unRuleY_95363
Feb 23, 2006Historic F5 Account
I'm a little concerned that you don't have a way to unset the array if the call ends normally. This will potentially fill up your memory. You should look into using the session add/lookup commands instead as these can use a timeout to remove stale data. Basically, you'd want to use:
session add uie $callid [findstr $fullpacket "P-Asserted-Identity:" 0 "\r"]
instead of:set ::callidtable($callid) [findstr $fullpacket "P-Asserted-Identity:" 0 "
" ]
and then use:id = [session lookup uie $callid]
if { $id ne "" } { ...
instead of:
if {[info exists ::callidtable($callid)} {...
You could thereafter simply refer to $id and to then also you can use:
session delete uie $callid
in place of the unset.I am a little puzzled by the -2 stuff since \n is actually only 1 character (a linefeed). Perhaps you really want "\r\n" there.
Hope that helps. It it looking like a pretty cool rule.