diff --git a/apps/auth_b2b/AuthB2B.cpp b/apps/auth_b2b/AuthB2B.cpp index 4e5bd727..1c84e1ea 100644 --- a/apps/auth_b2b/AuthB2B.cpp +++ b/apps/auth_b2b/AuthB2B.cpp @@ -143,24 +143,9 @@ void AuthB2BDialog::onInvite(const AmSipRequest& req) } invite_req = req; - size_t pos1, pos2, hdr_start; - if (findHeader(invite_req.hdrs,PARAM_HDR, pos1, pos2, - hdr_start)) { - while (invite_req.hdrs[pos2]=='\r' ||invite_req.hdrs[pos2]=='\n') - pos2++; - - hdr_start -= 11; //"P-App-Param" - invite_req.hdrs.erase(hdr_start, pos2-hdr_start); - } - - if (findHeader(invite_req.hdrs,"P-App-Name", pos1, pos2, - hdr_start)) { - while (invite_req.hdrs[pos2]=='\r' ||invite_req.hdrs[pos2]=='\n') - pos2++; - hdr_start -= 10; //"P-App-Name" - invite_req.hdrs.erase(hdr_start, pos2-hdr_start); - } + removeHeader(invite_req.hdrs,PARAM_HDR); + removeHeader(invite_req.hdrs,"P-App-Name"); dlg.updateStatus(req); recvd_req.insert(std::make_pair(req.cseq,req));