Modifying Transit Network Selection Filters
Applies to: Tmedia 3.0, 3.2, 3.3
Before filter
This filter is specific to SPIROU. In SPIROU, the Network Identification used for Transit Network Selection can be added at the beginning of the called number, when Nature Of Address (NOA) is set to "international number with transit network selection" or "national number with transit network selection". This example works for Network Identification of 4 digits, modify it to match the number of digits in your specific network.
# Specific to Spirou, remaps called nature of address, removes selection prefix
# and uses it as the network_identification field
# This example will work for selection prefixes of 4 digits, modify .slice!(0..3) according to
# the length of the selection prefixes in your network
def transit_network_selection_before_filter params
#Reset value to false
@route_rejected = false
call = params[:call]
called_noa = call[:called_noa]
case called_noa
when 'international_number_with_transit_network_selection'
call[:called_noa] = 'international_number'
call[:network_identification] = call[:called].slice!(0..3)
when 'national_number_with_transit_network_selection'
call[:called_noa] = 'national_number'
call[:network_identification] = call[:called].slice!(0..3)
end
params
endRoute match
This filter allows to match routes according to the network_identification column when Transit Network Selection (TNS) is present. Calls will be routed normally if the TNS IE is not present.
See Add Network Identification column to Routes.
After filter
This filter removes the Transit Network Selection information from the route, after the information has been used to route the call. It also makes sure the correct release reason is sent when there is no route because no route matched the requested network identification. Do not use this filter if it is required to transmit the Transit Network Selection IE from the incoming leg to the outgoing leg.
Last updated
Was this helpful?

