From f7d7436d5db91343fe3c6a885f458692b04644cb Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Thu, 10 Oct 2024 15:09:33 +0200 Subject: [PATCH] MT#61140 sendEstablishedReInvite: add `hdrs` param Add `hdrs` param to be able to handle pending updates with custom headers. Change-Id: I4f703f2a2553d903fb81d4246ad46b6c0b078021 --- core/AmB2BSession.cpp | 4 ++-- core/AmB2BSession.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/AmB2BSession.cpp b/core/AmB2BSession.cpp index ce2db16f..1f1e1ec3 100644 --- a/core/AmB2BSession.cpp +++ b/core/AmB2BSession.cpp @@ -989,7 +989,7 @@ bool AmB2BSession::updateSessionDescription(const AmMimeBody& body) { return false; } -int AmB2BSession::sendEstablishedReInvite() { +int AmB2BSession::sendEstablishedReInvite(const std::string &hdrs) { if (established_body.empty()) { ERROR("trying to re-INVITE with saved description, but none saved\n"); return -1; @@ -1000,7 +1000,7 @@ int AmB2BSession::sendEstablishedReInvite() { try { AmMimeBody body(established_body); // contains only SDP updateLocalBody(body); - return dlg->reinvite("", &body, SIP_FLAGS_VERBATIM); + return dlg->reinvite(hdrs, &body, SIP_FLAGS_VERBATIM); } catch (const string& s) { ERROR("sending established SDP reinvite: %s\n", s.c_str()); } diff --git a/core/AmB2BSession.h b/core/AmB2BSession.h index eef7e5dc..84eb99ca 100644 --- a/core/AmB2BSession.h +++ b/core/AmB2BSession.h @@ -255,7 +255,7 @@ private: /** send re-INVITE with established session description * @return 0 on success */ - int sendEstablishedReInvite(); + int sendEstablishedReInvite(const std::string &hdrs = ""); /** do session refresh */ bool refresh(int flags = 0);