From eb60a005dd38f8a4b45ea8e95fb12cdd26bb8cbe Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Mon, 20 Feb 2023 17:21:17 +0100 Subject: [PATCH] MT#56321 DSM: Finishing the DSM playback, support: 486, 487 and 603 We have to add more SIP response codes, which will be checked against the isDSMPlaybackFinished(). So that when the DSM playback is finished, the call is properly released on the caller's side. Exceptionally 487 is added, for cases like: a call to HG, where nobody answers and the timeout triggers a cancelation of all the legs. Change-Id: I1f7cf81dd5966843713fc41c21ea0249174c13ab --- core/AmB2BSession.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/AmB2BSession.cpp b/core/AmB2BSession.cpp index cd536354..d9b73aa4 100644 --- a/core/AmB2BSession.cpp +++ b/core/AmB2BSession.cpp @@ -365,8 +365,16 @@ void AmB2BSession::onB2BEvent(B2BEvent* ev) } } - /* 480 - processing of the playback completion from DSM applications */ - } else if (reply_ev->reply.code == 480 && dlg->getStatus() == AmSipDialog::Connected) { + /* Processing of the playback completion from DSM applications + * For now we only support: 480 Unavailable and 486 Busy/603 Decline. + * Exceptionally 487 is added, for cases like: + * a call to HG, where nobody answers and the timeout triggers a cancelation of all the legs. + */ + } else if ((reply_ev->reply.code == 480 || + reply_ev->reply.code == 486 || + reply_ev->reply.code == 487 || + reply_ev->reply.code == 603) + && dlg->getStatus() == AmSipDialog::Connected) { /* TT#188800, if this is a completion of the playback of one of the DSM applications, (office hours, play last caller, pre announce, early dbprompt)