From 2ea1d7ee45d6fc98e217301c5d0c6a69629c1e59 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Mon, 17 Dec 2012 06:12:39 +0100 Subject: [PATCH] Fix: Only screen caller ID 2 and redir ID when existing Thanx to Wimpy for pointing to this bug. --- apppbx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apppbx.cpp b/apppbx.cpp index 8df43f6..806655c 100644 --- a/apppbx.cpp +++ b/apppbx.cpp @@ -1389,8 +1389,8 @@ void EndpointAppPBX::port_setup(struct port_list *portlist, int message_type, un /* screen incoming caller id */ if (e_callerinfo.interface[0]) { do_screen(0, e_callerinfo.id, sizeof(e_callerinfo.id), &e_callerinfo.ntype, &e_callerinfo.present, e_callerinfo.interface); - do_screen(0, e_callerinfo.id2, sizeof(e_callerinfo.id2), &e_callerinfo.ntype2, &e_callerinfo.present2, e_callerinfo.interface); - do_screen(0, e_redirinfo.id, sizeof(e_redirinfo.id), &e_redirinfo.ntype, &e_redirinfo.present, e_callerinfo.interface); + if (e_callerinfo.id2[0]) do_screen(0, e_callerinfo.id2, sizeof(e_callerinfo.id2), &e_callerinfo.ntype2, &e_callerinfo.present2, e_callerinfo.interface); + if (e_redirinfo.id[0]) do_screen(0, e_redirinfo.id, sizeof(e_redirinfo.id), &e_redirinfo.ntype, &e_redirinfo.present, e_callerinfo.interface); } /* process extension */ -- 2.13.6