Taut_SRISOMCHAI
Oct 05, 2022Employee
Solved
Gy Diameter irule example
Dear experts,
I am studying the Gy diameter MRF to make a routing based on the IMSI and 3GPP-Charging-Characteristics but those are under the AVP grouped. Can anyone please suggest how can i extr...
- Oct 12, 2022
try something like below.
replace parent with subscription-id
replace avp1 with subscription-id-type, avp1 value would be either 0 or 1 (set to match what you are looking for)
replace avp2 with subscription-id-data
vendor-id is optional, you can remove them or set to 0
# <parentAvpName>
set count [DIAMETER::avp count <parentAvpCode> vendor-id <parentAvpVendorId>]
set index 0
set myavp ""
while { $index < $count } {
set parent [DIAMETER::avp data get <parentAvpCode> grouped vendor-id <parentAvpVendorId> index $index]
# <avp1Name>
set child [DIAMETER::avp data get <avp1Code> <avp1Format> vendor-id <avp1VendorId> source $parent]
if { $child == "<avp1ValueId>" } {
# <avp0Name>
set myavp [DIAMETER::avp data get <avp0Code> <avp0Format> vendor-id <avp0VendorId> source $parent]
break
}
incr index
}note that you can generate this from diameter wizard (or diameter iAppsLX)