]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_iax2: Add log message for rejected calls.
authorNaveen Albert <asterisk@phreaknet.org>
Mon, 6 Nov 2023 12:31:32 +0000 (07:31 -0500)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 23 Jan 2025 18:39:41 +0000 (18:39 +0000)
Add a log message for a path that currently silently drops IAX2
frames without indicating that anything is wrong.

(cherry picked from commit 9ced75008a757123eebdea669cba37dc67bf1d61)

channels/chan_iax2.c

index c499e1e69e451c4c0ab71870a594e3979c045892..a99e789de5790bb638b347c3d60ca4f5c6bed5ab 100644 (file)
@@ -10403,10 +10403,13 @@ static int socket_process_helper(struct iax2_thread *thread)
                }
 
                if (!(fr->callno = find_callno(ntohs(mh->callno) & ~IAX_FLAG_FULL, dcallno, &addr, new, fd, check_dcallno))) {
+                       ast_debug(1, "Received frame without existent call number (%d)\n", ntohs(mh->callno) & ~IAX_FLAG_FULL);
                        if (f.frametype == AST_FRAME_IAX && f.subclass.integer == IAX_COMMAND_NEW) {
                                send_apathetic_reply(1, ntohs(fh->scallno), &addr, IAX_COMMAND_REJECT, ntohl(fh->ts), fh->iseqno + 1, fd, NULL);
                        } else if (f.frametype == AST_FRAME_IAX && (f.subclass.integer == IAX_COMMAND_REGREQ || f.subclass.integer == IAX_COMMAND_REGREL)) {
                                send_apathetic_reply(1, ntohs(fh->scallno), &addr, IAX_COMMAND_REGREJ, ntohl(fh->ts), fh->iseqno + 1, fd, NULL);
+                       } else {
+                               ast_log(LOG_WARNING, "Silently dropping frame without existent call number: %d\n", ntohs(mh->callno) & ~IAX_FLAG_FULL);
                        }
                        ast_variables_destroy(ies.vars);
                        return 1;