diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e0b4da412fe0f7ae9763f4d4a979584bb6e7ff08..2e71e7a668202b09353c9b91b9b747a682a2474f 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);