summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d477a172b..ca52b465d 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: