diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d477a172b6..ca52b465d3 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: