* #27724: sdp: remove old contact header (if present)

This commit is contained in:
Tristan Matthews
2013-08-16 12:19:55 -04:00
parent 6ffe2aeac7
commit 0be5951ff1

View File

@ -240,6 +240,8 @@ addContactHeader(const std::string &contactStr, pjsip_tx_data *tdata)
pjsip_contact_hdr *contact = pjsip_contact_hdr_create(tdata->pool);
contact->uri = pjsip_parse_uri(tdata->pool, pjContact.ptr,
pjContact.slen, PJSIP_PARSE_URI_AS_NAMEADDR);
// remove old contact header (if present)
pjsip_msg_find_remove_hdr(tdata->msg, PJSIP_H_CONTACT, NULL);
pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*) contact);
}