Code Monkey home page Code Monkey logo

Comments (3)

gfosco avatar gfosco commented on September 23, 2024

One way is to stop node-twilio from handling your provisioning URL's and handle those requests with your normal page router... I'm currently working on the same issue. I've all but removed AutoUri from the code, and need to finish. Unfortunately, it means separating some of the call logic.

i.e. in my apps twilio module:

var client = new twilioClient('sid','token','host');
exports.client = client;
var client2 = new twilioClient('sid','token','host');
exports.client2 = client2;

var phones = {};
phones['1234567890'] = client.getPhoneNumber('+11234567890');
phones['2345678901'] = client2.getPhoneNumber('+12345678901');
exports.phones = phones;

exports.twiML = twiML;

Then in my main server file, I use my router ("Choreographer") to handle inbound requests (to either number, since this is the URL configured on Twilio for both numbers.)

router.post('/inboundText', function(req, res) {
var formData = "";

req.on('data', function(data) {
    formData += data;
});
req.on('end', function() {
    formData = qs.parse(formData);
    console.log(formData);
    });
});

from node-twilio.

drewlesueur avatar drewlesueur commented on September 23, 2024

Yea. I ended up just using the underlying api (in lib/rest-client.js and lib/twiml.js) and handled the routing myself. :)

from node-twilio.

ukd1 avatar ukd1 commented on September 23, 2024

This library is deprecated in favor of the official library - https://github.com/twilio/twilio-node

from node-twilio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.