persistence based on MSISDN number

hello,

Im new to Irules,

would like to know if there is an Irule that that can persist client connection based on client mobile number or msisdn? the client mobile number is included within the header whenever the client request for a service or connection to the backend server.

thanks in advance

One way to accomplish this is with the universal persistence profile, which lets you persist on strings located within, among other things, HTTP headers. For example (and I’m getting this right out of the book I received in training):

when HTTP_REQUEST { 
   persist uie [findstr [HTTP::URI] "user=" 5 "&"] 
 }

…will persist on a name/value pair as presented in the URL string. There are probably other ways of doing this, but this came to mind immediately.

http://devcentral.f5.com/weblogs/dctv/archive/2008/06/25/3390.aspx

A more generalized solution that I think can be applied to your case.

Click here for a post I found in the v4.x forum that seems to contain a v9 version of an MSISDN persistence iRule they wanted to convert to v4.x…

hth

/deb

oh, also please post back if it works & we can add it to the codeshare.

hello guys,

thanks for the reply. anyways can you help me understand what the Irule below does.

thanks in advance.

when CLIENT_ACCEPTED {

TCP::collect

}

when CLIENT_DATA {

set str “[TCP::payload ]”

if { $str contains “AAA” } {

set num [ findstr “$str” “AAA:” 7 \n ]

}

persist uie $num 300

TCP::release

}

I think than it could work on this way:

accumulate

if { tcp_content contains “MSISDN”}

set num [findstr[tcp_content] “MSISDN:” 7\n]

persist simple $num 300

discard