From 377da118d903784a60725a91c8e3b567328b6604 Mon Sep 17 00:00:00 2001 From: Kasi Prasad Plivo <111332689+kasi-plivo@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:47:09 +0530 Subject: [PATCH 1/3] Update customclient.js --- chromeExten-plivo/js/customclient.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chromeExten-plivo/js/customclient.js b/chromeExten-plivo/js/customclient.js index 1696279..12527a9 100644 --- a/chromeExten-plivo/js/customclient.js +++ b/chromeExten-plivo/js/customclient.js @@ -131,6 +131,10 @@ function onCallRemoteRinging(){ $('#callstatus').html('Ringing...'); console.info('onCallRemoteRinging'); } +function onCallConnected(){ + $('#callstatus').html('Connected...'); + console.info('onCallConnected'); +} function onCallAnswered(){ console.info('onCallAnswered'); $('#callstatus').html('Answered'); @@ -465,6 +469,7 @@ function initPhone(username, password){ plivoBrowserSdk.client.on('onLogout', onLogout); plivoBrowserSdk.client.on('onLoginFailed', onLoginFailed); plivoBrowserSdk.client.on('onCallRemoteRinging', onCallRemoteRinging); + plivoBrowserSdk.client.on('onCallConnected', onCallConnected); plivoBrowserSdk.client.on('onIncomingCallCanceled', onIncomingCallCanceled); plivoBrowserSdk.client.on('onCallFailed', onCallFailed); plivoBrowserSdk.client.on('onCallAnswered', onCallAnswered); @@ -490,4 +495,4 @@ function PlivoJsReady(){ resetSettings(); initPhone(); } -} \ No newline at end of file +} From 5dce4c7123faf66ebe17b8c4c4e639168bbb209f Mon Sep 17 00:00:00 2001 From: Kasi Prasad Plivo <111332689+kasi-plivo@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:50:55 +0530 Subject: [PATCH 2/3] Update customclient.js --- electronApp-plivo/js/customclient.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/electronApp-plivo/js/customclient.js b/electronApp-plivo/js/customclient.js index b8d649b..8f1868b 100644 --- a/electronApp-plivo/js/customclient.js +++ b/electronApp-plivo/js/customclient.js @@ -105,6 +105,10 @@ function onCallRemoteRinging(){ $('#callstatus').html('Ringing...'); console.info('onCallRemoteRinging'); } +function onCallConnected(){ + $('#callstatus').html('Connected...'); + console.info('onCallConnected'); +} function onCallAnswered(){ console.info('onCallAnswered'); $('#callstatus').html('Answered'); @@ -582,6 +586,7 @@ function initPhone(username, password){ plivoBrowserSdk.client.on('onLogout', onLogout); plivoBrowserSdk.client.on('onLoginFailed', onLoginFailed); plivoBrowserSdk.client.on('onCallRemoteRinging', onCallRemoteRinging); + plivoBrowserSdk.client.on('onCallConnected', onCallConnected); plivoBrowserSdk.client.on('onIncomingCallCanceled', onIncomingCallCanceled); plivoBrowserSdk.client.on('onCallFailed', onCallFailed); plivoBrowserSdk.client.on('onCallAnswered', onCallAnswered); @@ -602,4 +607,4 @@ function initPhone(username, password){ displayCallHistory(); starFeedback(); console.log('initPhone ready!') -} \ No newline at end of file +} From 16d4ad8850b9d97950b57d83693ea784cbcd2de8 Mon Sep 17 00:00:00 2001 From: Kasi Prasad Plivo <111332689+kasi-plivo@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:52:40 +0530 Subject: [PATCH 3/3] Update customclient.js --- webApp-plivo/public/js/customclient.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webApp-plivo/public/js/customclient.js b/webApp-plivo/public/js/customclient.js index 54ec999..48b1ea8 100644 --- a/webApp-plivo/public/js/customclient.js +++ b/webApp-plivo/public/js/customclient.js @@ -246,6 +246,12 @@ function onCallRemoteRinging(callInfo){ console.info('onCallRemoteRinging'); } +function onCallConnected(callInfo) { + if (callInfo) console.log(JSON.stringify(callInfo)); + $('#callstatus').html('Connected...'); + console.info('onCallConnected'); +} + function onMediaConnected(callInfo){ if (callInfo) console.log(JSON.stringify(callInfo)); if (callInfo && callInfo.direction === 'incoming') { @@ -1123,6 +1129,7 @@ function initPhone(username, password){ plivoBrowserSdk.client.on('onLogout', onLogout); plivoBrowserSdk.client.on('onLoginFailed', onLoginFailed); plivoBrowserSdk.client.on('onCallRemoteRinging', onCallRemoteRinging); + plivoBrowserSdk.client.on('onCallConnected', onCallConnected); plivoBrowserSdk.client.on('onIncomingCallCanceled', onIncomingCallCanceled); plivoBrowserSdk.client.on('onIncomingCallIgnored', onIncomingCallIgnored); plivoBrowserSdk.client.on('onCallFailed', onCallFailed);