From: Joshua Colp Date: Fri, 2 Mar 2007 17:02:46 +0000 (+0000) Subject: If a SIP message comes in and goes to a method handler that requires additional value... X-Git-Tag: 1.2.16~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bf891f35335c919fdb4a0d5cdb8cf75a8f11971;p=thirdparty%2Fasterisk.git If a SIP message comes in and goes to a method handler that requires additional values that may not be present then send back an error. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57475 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2ce4d2574d..29916b7414 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11340,6 +11340,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)) { + transmit_response(p, "503 Server error", req); + ast_set_flag(p, SIP_NEEDDESTROY); + return -1; + } + /* Handle various incoming SIP methods in requests */ switch (p->method) { case SIP_OPTIONS: