Forum Discussion
Yaniv_99962
Jul 07, 2011Nimbostratus
Thanks Aaron,
I made it working.
I created an iRule under the Radius accounting Virtual Server (UDP 1813) so that for every Radius Start (Acct-Status-Type[40]=1) the F5 will write an entry to a memory table called “ip2msisdn” using the subscriber IP as the key (Framed-IP-Address[8]) and the subscriber MSISDN as value (Calling-Station-Id[31]). For every Radius Stop (Acct-Status-Type[40]=2) the F5 will delete the value assigned to the key.
when CLIENT_DATA {
if { [RADIUS::avp 40 integer] equals 1}{
table set -subtable "ip2msisdn" [RADIUS::avp 8 ip4] [RADIUS::avp 31 string]
}
elseif { [RADIUS::avp 40 integer] equals 2}{
table delete -subtable "ip2msisdn" [RADIUS::avp 8 ip4]
}
}
I created an iRule under the HTTP Virtual Server (TCP 80) so that for every HTTP request it will look at the source IP of the packet and use it to lookup in the “ip2msisdn” table to get the MSISDN of that subscriber and insert it into an HTTP header called MSISDN.
when HTTP_REQUEST {
HTTP::header insert MSISDN [table lookup -subtable "ip2msisdn" [IP::client_addr]]
forward
}
Thanks a lot