@@ -16512,9 +16512,15 @@ CREATE FUNCTION switch15.route(i_node_id integer, i_pop_id integer, i_protocol_i
1651216512
1651316513
1651416514 select into v_area_direction * from class4.routing_tag_detection_rules
16515- where (src_area_id is null OR src_area_id = v_ret.src_area_id) AND (dst_area_id is null OR dst_area_id=v_ret.dst_area_id)
16516- order by src_area_id is null, dst_area_id is null
16517- limit 1;
16515+ where
16516+ (src_area_id is null OR src_area_id = v_ret.src_area_id) AND
16517+ (dst_area_id is null OR dst_area_id=v_ret.dst_area_id) AND
16518+ yeti_ext.tag_compare(routing_tag_ids, v_call_tags)>0
16519+ order by
16520+ yeti_ext.tag_compare(routing_tag_ids, v_call_tags) desc,
16521+ src_area_id is null,
16522+ dst_area_id is null
16523+ limit 1;
1651816524 if found then
1651916525 v_call_tags=yeti_ext.tag_action(v_area_direction.tag_action_id, v_call_tags, v_area_direction.tag_action_value);
1652016526 end if;
@@ -17459,9 +17465,15 @@ CREATE FUNCTION switch15.route_debug(i_node_id integer, i_pop_id integer, i_prot
1745917465
1746017466
1746117467 select into v_area_direction * from class4.routing_tag_detection_rules
17462- where (src_area_id is null OR src_area_id = v_ret.src_area_id) AND (dst_area_id is null OR dst_area_id=v_ret.dst_area_id)
17463- order by src_area_id is null, dst_area_id is null
17464- limit 1;
17468+ where
17469+ (src_area_id is null OR src_area_id = v_ret.src_area_id) AND
17470+ (dst_area_id is null OR dst_area_id=v_ret.dst_area_id) AND
17471+ yeti_ext.tag_compare(routing_tag_ids, v_call_tags)>0
17472+ order by
17473+ yeti_ext.tag_compare(routing_tag_ids, v_call_tags) desc,
17474+ src_area_id is null,
17475+ dst_area_id is null
17476+ limit 1;
1746517477 if found then
1746617478 v_call_tags=yeti_ext.tag_action(v_area_direction.tag_action_id, v_call_tags, v_area_direction.tag_action_value);
1746717479 end if;
@@ -18351,9 +18363,15 @@ CREATE FUNCTION switch15.route_release(i_node_id integer, i_pop_id integer, i_pr
1835118363
1835218364
1835318365 select into v_area_direction * from class4.routing_tag_detection_rules
18354- where (src_area_id is null OR src_area_id = v_ret.src_area_id) AND (dst_area_id is null OR dst_area_id=v_ret.dst_area_id)
18355- order by src_area_id is null, dst_area_id is null
18356- limit 1;
18366+ where
18367+ (src_area_id is null OR src_area_id = v_ret.src_area_id) AND
18368+ (dst_area_id is null OR dst_area_id=v_ret.dst_area_id) AND
18369+ yeti_ext.tag_compare(routing_tag_ids, v_call_tags)>0
18370+ order by
18371+ yeti_ext.tag_compare(routing_tag_ids, v_call_tags) desc,
18372+ src_area_id is null,
18373+ dst_area_id is null
18374+ limit 1;
1835718375 if found then
1835818376 v_call_tags=yeti_ext.tag_action(v_area_direction.tag_action_id, v_call_tags, v_area_direction.tag_action_value);
1835918377 end if;
@@ -19708,9 +19726,9 @@ CREATE TABLE class4.customers_auth (
1970819726 dst_number_max_length smallint DEFAULT 100 NOT NULL,
1970919727 check_account_balance boolean DEFAULT true NOT NULL,
1971019728 require_incoming_auth boolean DEFAULT false NOT NULL,
19729+ dst_number_min_length smallint DEFAULT 0 NOT NULL,
1971119730 tag_action_id smallint,
1971219731 tag_action_value smallint[] DEFAULT '{}'::smallint[] NOT NULL,
19713- dst_number_min_length smallint DEFAULT 0 NOT NULL,
1971419732 ip inet[] DEFAULT '{127.0.0.0/8}'::inet[],
1971519733 src_prefix character varying[] DEFAULT '{""}'::character varying[],
1971619734 dst_prefix character varying[] DEFAULT '{""}'::character varying[],
@@ -26541,8 +26559,7 @@ ALTER TABLE ONLY sys.sensors
2654126559-- PostgreSQL database dump complete
2654226560--
2654326561
26544- SET search_path TO gui, public, switch, billing, class4, runtime_stats, sys, logs, data_import
26545- ;
26562+ SET search_path TO gui, public, switch, billing, class4, runtime_stats, sys, logs, data_import;
2654626563
2654726564INSERT INTO public.schema_migrations (version) VALUES ('20170822151410');
2654826565
0 commit comments