diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d477a172b6996b6871722170b3481698b84661d8..ca52b465d3d6e8a5408af5322764982eb5d632c4 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -15324,6 +15324,12 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
 		}
 	}
 
+	if (!e && (p->method == SIP_INVITE || p->method == SIP_SUBSCRIBE || p->method == SIP_REGISTER || p->method == SIP_NOTIFY)) {
+		transmit_response(p, "503 Server error", req);
+		sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
+		return -1;
+	}
+
 	/* Handle various incoming SIP methods in requests */
 	switch (p->method) {
 	case SIP_OPTIONS: