Skip to content

Conversation

@cmillane
Copy link
Collaborator

Adjustments to accommodate Twilio's Dialverb changes. Also updated branding from VictorOps to Splunk On-Call

Adjustments to accommodate Twilio's Dialverb changes.  Also updated rebranding from VictorOps to Splunk On-Call
noTeam: (team) => `Team ${team} does not exist. Please contact your administrator to fix the problem.`
voCallNotAnswered: (caller) => `Missed call from ${caller}.`,
voCallCompleted: (user, caller, log) => `${user} answered a call from ${caller}. ${log}`,
noTeam: (team) => `Team ${team} does not exist. Please contact your administrator to fix the problem.`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra space

Copy link
Collaborator

@cphillips2 cphillips2 Jul 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

const escPolicyUrlArray = createEscPolicyUrls(context, teamsArray[0].slug);
const phoneNumberArray = escPolicyUrlArray.map(url => getPhoneNumbers(context, url, teamsArray[0].name, teamsArray[0].escPolicyName));

phoneNumberArray.length = 1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this, it was added so we wouldn't have to wait through multiple calls for testing

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

let {detailedLog, realCallerId} = payload;
let phoneNumber;

let phoneNumber;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: trailing space

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

phoneNumber.phone
);
}
return postToVictorOps(event,context,payload);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:
return postToVictorOps(event, context, payload);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

}
return postToVictorOps(event,context,payload);
}
else{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:
} else {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

detailedLog,
phoneNumber,
phoneNumbers,
realCallerId,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated realCallerId, delete second one

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

`${messages.attemptTranscription} ${messages.goodbye}`
);
if (DialCallStatus == 'completed' && DialBridged == 'true') {
return postToVictorOps(event,context,payload);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:
return postToVictorOps(event, context, payload);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

);
if (DialCallStatus == 'completed' && DialBridged == 'true') {
return postToVictorOps(event,context,payload);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:
} else {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

return;
}

//console.log(alert)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

{voice},
`${messages.attemptTranscription} ${messages.goodbye}`
);
if (DialCallStatus == 'completed' && DialBridged == 'true') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (DialCallStatus === 'completed' && DialBridged == 'true') {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using === prevents recovery alerts when the callee hangs up.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whatever gets the result we want :)

{voice},
`${messages.otherPartyDisconnect} ${messages.goodbye}`
);
resolve(DialCallStatus == 'completed' && TranscriptionStatus !== 'failed' ? twiml : '');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolve(DialCallStatus === 'completed' && TranscriptionStatus !== 'failed' ? twiml : '');

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using === prevents recovery alerts when the callee hangs up.

cmillane added 2 commits July 8, 2021 09:46
Performed further testing and revised the code
Addresses Twilio's upcoming Dialverb changes, VOSE-1461, and VOSE-1463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants