How to use the plivo.Response function in plivo

To help you get started, we’ve selected a few plivo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github opentok / opentok-rtc / server / serverMethods.js View on Github external
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));
      }
    });
  }

plivo

A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML

MIT
Latest version published 10 days ago

Package Health Score

75 / 100
Full package analysis