aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-06 12:34:58 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-06 12:34:58 +0000
commit6f847542b7f27741c95fbdf7aafb41ef34570254 (patch)
treeca09d2c8b9484ab12028f002290a608c98cabac6 /channels
parent43115b24195234a7f04c6230b2c00012eb88cfec (diff)
Don't send Contact in SIP Messages (imported from 1.2/1.4).
Reported by Gunnar at Omnitor. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48318 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e0b4da412..2e71e7a66 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5733,9 +5733,10 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in
add_header(req, "From", ot);
add_header(req, "To", of);
}
- /* Do not add Contact for BYE and Cancel requests */
- if (sipmethod != SIP_BYE && sipmethod != SIP_CANCEL)
+ /* Do not add Contact for MESSAGE, BYE and Cancel requests */
+ 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);