diff options
author | Joshua Colp <jcolp@digium.com> | 2013-11-28 01:56:52 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2013-11-28 01:56:52 +0000 |
commit | b315b16c90701ff2f1811220d151db6dcef1b60b (patch) | |
tree | 9185f73bebbecd9d0839d46cb2b12022c957fa4d | |
parent | 6019353ad68ea249ac1152938914562448fbba8c (diff) |
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
........
Merged revisions 403221 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | res/res_pjsip_header_funcs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_pjsip_header_funcs.c b/res/res_pjsip_header_funcs.c index 11ab44c10..063fbb761 100644 --- a/res/res_pjsip_header_funcs.c +++ b/res/res_pjsip_header_funcs.c @@ -583,7 +583,8 @@ static void outgoing_request(struct ast_sip_session *session, pjsip_tx_data * td 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; } |