changeset 266:556cd78f750a

sip-out: require explicit routes to made-up N9X area codes
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 13 Nov 2023 15:18:09 -0800
parents e4a93ad611f3
children 81958b35f74d
files sip-out/call_setup.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sip-out/call_setup.c	Mon Nov 13 15:09:10 2023 -0800
+++ b/sip-out/call_setup.c	Mon Nov 13 15:18:09 2023 -0800
@@ -115,6 +115,10 @@
 					GSM48_CC_CAUSE_NO_ROUTE);
 			return;
 		}
+		/* made-up N9X area codes require explicit routes */
+		if (msg->called.number[0] == '1' &&
+		    msg->called.number[2] == '9' && prefix_len < 4)
+			goto no_route_to_dest;
 		to_sip_user[0] = '+';
 		strcpy(to_sip_user+1, msg->called.number);
 		special_rt = 0;