[asterisk-commits] oej: branch 1.4 r126789 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 1 06:51:38 CDT 2008


Author: oej
Date: Tue Jul  1 06:51:38 2008
New Revision: 126789

URL: http://svn.digium.com/view/asterisk?view=rev&rev=126789
Log:
Report 200 OK to all in-dialog OPTIONs requests (to confirm that the dialog
exist). Don't bother checking the request URI.

(closes issue #11264)
Reported by: ibc

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=126789&r1=126788&r2=126789
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Tue Jul  1 06:51:38 2008
@@ -13584,10 +13584,17 @@
 {
 	int res;
 
+
+	/* XXX Should we authenticate OPTIONS? XXX */
+
+	if (p->lastinvite) {
+		/* if this is a request in an active dialog, just confirm that the dialog exists. */
+		transmit_response_with_allow(p, "200 OK", req, 0);
+		return 0;
+	}
+
 	res = get_destination(p, req);
 	build_contact(p);
-
-	/* XXX Should we authenticate OPTIONS? XXX */
 
 	if (ast_strlen_zero(p->context))
 		ast_string_field_set(p, context, default_context);
@@ -13601,8 +13608,7 @@
 
 	/* Destroy if this OPTIONS was the opening request, but not if
 	   it's in the middle of a normal call flow. */
-	if (!p->lastinvite)
-		sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
+	sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
 
 	return res;
 }




More information about the asterisk-commits mailing list