changeset 255:b0bf167bb846

themwi-update-outrt: add route-to-e911 option
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 15 Aug 2023 00:23:03 -0800
parents beb6aaecfe63
children 63252528a56c
files utils/themwi-update-outrt.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/utils/themwi-update-outrt.c	Tue Aug 15 00:15:33 2023 -0800
+++ b/utils/themwi-update-outrt.c	Tue Aug 15 00:23:03 2023 -0800
@@ -328,11 +328,12 @@
 		exit(1);
 	}
 	rec->sip_dest_id = dest_id;
+	rec->flags = 0;
 	special_num_count++;
 }
 
 static void
-handle_special_num_route_to(num_code, cp)
+handle_special_num_route_to(num_code, cp, is_e911)
 	char *num_code, *cp;
 {
 	struct special_num_route *rec;
@@ -366,6 +367,7 @@
 	strcpy(rec->special_num, num_code);
 	strcpy(rec->sip_user, num_code);
 	rec->sip_dest_id = dest_id;
+	rec->flags = is_e911 ? SPECIAL_NUM_FLAG_E911 : 0;
 	special_num_count++;
 }
 
@@ -401,7 +403,9 @@
 	if (!strcmp(handling_kw, "map-to"))
 		handle_special_num_map_to(num_code, cp);
 	else if (!strcmp(handling_kw, "route-to"))
-		handle_special_num_route_to(num_code, cp);
+		handle_special_num_route_to(num_code, cp, 0);
+	else if (!strcmp(handling_kw, "route-to-e911"))
+		handle_special_num_route_to(num_code, cp, 1);
 	else
 		goto inv_syntax;
 }