aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-06 12:14:40 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-06 12:14:40 +0000
commita74d5ac1e329b80fd47d42e02523f9aa37041621 (patch)
tree41b8ba82e6097f877b97f0ea7f5eb8f2c23c564a
parentc073be6427b09795beadbfb2222265b6813a030d (diff)
Don't add Contact header on BYE, CANCEL, MESSAGE requests
(Bye, Cancel backported from 1.4, MESSAGE bug reported to me by Gunnar at Omnitor) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@48315 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 82f12aea5..51c90ea35 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4259,7 +4259,8 @@ 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);
+ if (sipmethod != SIP_BYE && sipmethod != SIP_CANCEL && sipmethod != SIP_MESSAGE)
+ add_header(req, "Contact", p->our_contact);
copy_header(req, orig, "Call-ID");
add_header(req, "CSeq", tmp);