[asterisk-commits] file: branch 12 r403221 - /branches/12/res/res_pjsip_header_funcs.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Nov 27 19:56:04 CST 2013


Author: file
Date: Wed Nov 27 19:56:02 2013
New Revision: 403221

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403221
Log:
res_pjsip_header_funcs: Don't add headers to re-INVITEs.

When sending a re-INVITE to an endpoint it was possible for received
headers to be added as well (since they are stored for retrieval using
the PJSIP_HEADER dialplan function). This caused a broken (and
potentially large) SIP INVITE to be produced and sent.

This changes the module so it will no longer add headers to
re-INVITEs.

(closes issue ASTERISK-22882)
Reported by: David M. Lee

Modified:
    branches/12/res/res_pjsip_header_funcs.c

Modified: branches/12/res/res_pjsip_header_funcs.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip_header_funcs.c?view=diff&rev=403221&r1=403220&r2=403221
==============================================================================
--- branches/12/res/res_pjsip_header_funcs.c (original)
+++ branches/12/res/res_pjsip_header_funcs.c Wed Nov 27 19:56:02 2013
@@ -583,7 +583,8 @@
 	RAII_VAR(struct ast_datastore *, datastore,
 			 ast_sip_session_get_datastore(session, header_datastore.type), ao2_cleanup);
 
-	if (!datastore || !datastore->data) {
+	if (!datastore || !datastore->data ||
+		(session->inv_session->state >= PJSIP_INV_STATE_CONFIRMED)) {
 		return;
 	}
 




More information about the asterisk-commits mailing list