summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2006-10-25 20:21:05 +0000
committerOlle Johansson <oej@edvina.net>2006-10-25 20:21:05 +0000
commit1b3411f2ff9b3fab98dc2ce2fd8cfd0c7f670551 (patch)
tree63658ac29e5291a018a9b07e370b265436e86350 /channels
parentd448620715616ed1c1278dc92cb178fd3c2eeb32 (diff)
Old todo: Don't add Contact headers on BYE and CANCEL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 7116c09f2..914fc6da8 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5632,7 +5632,9 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in
add_header(req, "From", ot);
add_header(req, "To", of);
}
- add_header(req, "Contact", p->our_contact);
+ /* Do not add Contact for BYE and Cancel requests */
+ if (sipmethod != SIP_BYE && sipmethod != SIP_CANCEL)
+ add_header(req, "Contact", p->our_contact);
copy_header(req, orig, "Call-ID");
add_header(req, "CSeq", tmp);