Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update customclient.js #149

Open
wants to merge 3 commits into
base: beta
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion chromeExten-plivo/js/customclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);
Expand All @@ -490,4 +495,4 @@ function PlivoJsReady(){
resetSettings();
initPhone();
}
}
}
7 changes: 6 additions & 1 deletion electronApp-plivo/js/customclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);
Expand All @@ -602,4 +607,4 @@ function initPhone(username, password){
displayCallHistory();
starFeedback();
console.log('initPhone ready!')
}
}
7 changes: 7 additions & 0 deletions webApp-plivo/public/js/customclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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);
Expand Down