From: Andreas Eversberg Date: Mon, 17 Dec 2012 05:12:39 +0000 (+0100) Subject: Fix: Only screen caller ID 2 and redir ID when existing X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=commitdiff_plain;h=2ea1d7ee45d6fc98e217301c5d0c6a69629c1e59 Fix: Only screen caller ID 2 and redir ID when existing Thanx to Wimpy for pointing to this bug. --- 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 */