changeset 257:cb440d003976

sip-out: add libnumdb2 infra in prep for E911 routing
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 15 Aug 2023 10:50:37 -0800
parents 63252528a56c
children aab047d9efcb
files sip-out/Makefile sip-out/main.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sip-out/Makefile	Tue Aug 15 10:11:51 2023 -0800
+++ b/sip-out/Makefile	Tue Aug 15 10:50:37 2023 -0800
@@ -5,7 +5,8 @@
 	main.o mgw_ops.o mgw_resp.o mgw_sock.o mncc_sig_in.o mncc_sig_out.o \
 	mncc_sock.o readconf.o reinvite.o retrans.o shutdown.o sip_log.o \
 	sip_uas.o sip_udp.o uac_out.o uac_resp.o
-LIBS=	../liboutrt/liboutrt.a ../libsip/libsip.a ../libutil/libutil.a
+LIBS=	../liboutrt/liboutrt.a ../libnumdb2/libnumdb.a ../libsip/libsip.a \
+	../libutil/libutil.a
 INSTBIN=/usr/local/bin
 
 all:	${PROG}
--- a/sip-out/main.c	Tue Aug 15 10:11:51 2023 -0800
+++ b/sip-out/main.c	Tue Aug 15 10:50:37 2023 -0800
@@ -44,6 +44,10 @@
 
 	openlog("themwi-sip-out", 0, LOG_LOCAL5);
 	read_config_file();
+	if (read_number_db() < 0) {
+		fprintf(stderr, "error reading number database\n");
+		exit(1);
+	}
 	if (read_out_routes_db() < 0) {
 		fprintf(stderr, "error reading out-routes.bin database\n");
 		exit(1);