[asterisk-commits] file: branch 1.2 r57475 - /branches/1.2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Mar 2 10:02:47 MST 2007


Author: file
Date: Fri Mar  2 11:02:46 2007
New Revision: 57475

URL: http://svn.digium.com/view/asterisk?view=rev&rev=57475
Log:
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.

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=57475&r1=57474&r2=57475
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Fri Mar  2 11:02:46 2007
@@ -11338,6 +11338,12 @@
 			}
 			return res;
 		}
+	}
+
+	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 */



More information about the asterisk-commits mailing list