From d8ee133cf6a5c8b213c7b913e3305015d1d3caec Mon Sep 17 00:00:00 2001 From: Daniel Grotti Date: Thu, 29 Sep 2022 12:39:21 +0200 Subject: [PATCH] MT#55460 Stop ringing on CSC when call is connected or in progress In case of 183 session progress the CSC never stop playing fake ringing sound, even if the call is connected. Change-Id: I72bbecaf762581f5562ff95d17bd2606903f97da --- src/api/ngcp-call.js | 6 +++++- src/boot/ngcp-call.js | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/api/ngcp-call.js b/src/api/ngcp-call.js index 294da75e..959ea271 100644 --- a/src/api/ngcp-call.js +++ b/src/api/ngcp-call.js @@ -166,7 +166,11 @@ export async function callStart ({ number }) { $outgoingRtcSession = $userAgent.call(number, { eventHandlers: { progress (event) { - callEvent.emit('outgoingProgress', event) + if (event.response.status_code === 183) { + callEvent.emit('outgoingProgress', event) + } else { + callEvent.emit('outgoingRinging', event) + } }, failed (event) { callEvent.emit('outgoingFailed', event) diff --git a/src/boot/ngcp-call.js b/src/boot/ngcp-call.js index 871999e9..e572138e 100644 --- a/src/boot/ngcp-call.js +++ b/src/boot/ngcp-call.js @@ -38,9 +38,15 @@ export default async ({ Vue, app, store }) => { error: errorMessage }) }) - callEvent.on('outgoingProgress', (event) => { + callEvent.on('outgoingRinging', (event) => { store.commit('call/startRinging') }) + callEvent.on('outgoingProgress', (event) => { + store.commit('call/stopRinging') + }) + callEvent.on('outgoingConfirmed', (event) => { + store.commit('call/stopRinging') + }) callEvent.on('outgoingFailed', callFailed) callEvent.on('incomingFailed', callFailed) callEvent.on('outgoingEnded', callFailed)