From 8acd1e8349439dcf3d7b74340afde5dd23e2f366 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Thu, 29 Mar 2007 16:55:39 +0000 Subject: [PATCH] When the IAX2 read callback gets called, return NULL instead of a "null frame". This will cause Asterisk to hangup the call instead of keep trying whatever it was doing. Under normal conditions, this function would *never* be called. However, the author of this patch says an error will occur that will cause it to get called every 100 thousand calls or so. When this does happen, it puts the channel in a loop that eventually brings down the system. So, hangup up the call is certainly a better alternative. (issue #8286, john) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59341 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_iax2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 3f2a54fdf1..c3249e47d2 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -2986,8 +2986,8 @@ static int iax2_setoption(struct ast_channel *c, int option, void *data, int dat static struct ast_frame *iax2_read(struct ast_channel *c) { - ast_log(LOG_NOTICE, "I should never be called!\n"); - return &ast_null_frame; + ast_log(LOG_NOTICE, "I should never be called! Hanging up.\n"); + return NULL; } static int iax2_start_transfer(unsigned short callno0, unsigned short callno1, int mediaonly)