Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getForward(aReq, aRes) {
var plivoResponse = plivo.Response();
var phoneNumber = aReq.query['X-PH-DIALOUT-NUMBER'];
var uuid = aReq.query.CallUUID;
plivoResponse.addDial()
.addNumber(phoneNumber);
aRes.send(plivoResponse.toXML());
serverPersistence.getKey(redisPhonePrefix + phoneNumber, true)
.then((dialedNumberInfo) => {
if (dialedNumberInfo !== null) {
dialedNumberInfo.uuid = uuid;
serverPersistence.setKey(redisPhonePrefix + phoneNumber,
JSON.stringify(dialedNumberInfo));
}
});
}