MT#60408 CallLeg: use dedicated fund to check expecting offer

Add a function to the AmSipDialog class interface,
to be able to check whether the OA currently expects an offer.

Use it then in the `CallLeg::updateLocalSdp(AmSdp &sdp)`

Change-Id: I1c4f4364ce13c7b03e22e0f037d19b99245a0be8
mr12.5
Donat Zenichev 2 years ago
parent ad96f4598d
commit b21a430983

@ -1789,9 +1789,7 @@ void CallLeg::updateLocalSdp(AmSdp &sdp)
// FIXME: repeated SDP (183, 200) will cause false match in OA_Completed
// (need not to be expected with re-INVITEs asking for hold)
if (dlg->getOAState() == AmOfferAnswer::OA_None ||
dlg->getOAState() == AmOfferAnswer::OA_Completed)
{
if (dlg->oaExpectingOffer()) {
// handling offer
adjustOffer(sdp);
}

@ -223,6 +223,12 @@ void AmSipDialog::setOAState(AmOfferAnswer::OAState n_st) {
oa.setState(n_st);
}
/** are we expecting to receive an SDP offer? */
bool AmSipDialog::oaExpectingOffer() {
return oa.getState() == AmOfferAnswer::OA_None ||
oa.getState() == AmOfferAnswer::OA_Completed;
}
void AmSipDialog::setRel100State(Am100rel::State rel100_state) {
DBG("setting 100rel state for '%s' to %i\n", local_tag.c_str(), rel100_state);
rel100.setState(rel100_state);

@ -112,6 +112,8 @@ protected:
void setOAForceSDP(bool force) { oa.setForceSDP(force); }
bool getOAForceSDP() const { return oa.getForceSDP(); }
bool oaExpectingOffer();
/* getter/setter for faked 183 as 200OK responses, TT#187351 */
void setFaked183As200(bool value) { faked_183_as_200 = value; }
bool getFaked183As200() { return faked_183_as_200; }

Loading…
Cancel
Save