diff --git a/apps/examples/b2b_connect/b2b_connect.cpp b/apps/examples/b2b_connect/b2b_connect.cpp index 6aaef647..bde20ab0 100644 --- a/apps/examples/b2b_connect/b2b_connect.cpp +++ b/apps/examples/b2b_connect/b2b_connect.cpp @@ -286,13 +286,11 @@ inline UACAuthCred* b2b_connectCalleeSession::getCredentials() { return &credentials; } -void b2b_connectCalleeSession::onSipReply(const AmSipReply& reply) { - int status_before = dlg.getStatus(); - AmB2ABCalleeSession::onSipReply(reply); - int status = dlg.getStatus(); +void b2b_connectCalleeSession::onSipReply(const AmSipReply& reply, int old_dlg_status) { + AmB2ABCalleeSession::onSipReply(reply, old_dlg_status); - if ((status_before == AmSipDialog::Pending)&& - (status == AmSipDialog::Disconnected)) { + if ((old_dlg_status == AmSipDialog::Pending)&& + (dlg.getStatus() == AmSipDialog::Disconnected)) { DBG("status change Pending -> Disconnected. Stopping session.\n"); setStopped(); } diff --git a/apps/examples/b2b_connect/b2b_connect.h b/apps/examples/b2b_connect/b2b_connect.h index 487fa295..83d39bc2 100644 --- a/apps/examples/b2b_connect/b2b_connect.h +++ b/apps/examples/b2b_connect/b2b_connect.h @@ -88,7 +88,7 @@ class b2b_connectCalleeSession AmSipRequest invite_req; protected: - void onSipReply(const AmSipReply& reply); + void onSipReply(const AmSipReply& reply, int old_dlg_status); public: b2b_connectCalleeSession(const string& other_tag,