diff --git a/main/channel.c b/main/channel.c
index 6ba79eea6ead503d005544a4026eacb89e806895..16d89d6611d52b9044ba341fe1f38a3a308410b1 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2532,6 +2532,7 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
 	case AST_FRAME_NULL:
 	case AST_FRAME_IAX:
 		/* Ignore these */
+		res = 0;
 		break;
 	default:
 		res = chan->tech->write(chan, f);