Comments (3)
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.
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.
This library is deprecated in favor of the official library - https://github.com/twilio/twilio-node
from node-twilio.
Related Issues (20)
- Example SMS Send Erroring - Could Not Get Number HOT 4
- Twilio hangs up immediately , events not firing HOT 1
- Is there mandatory events with incomingCall? HOT 1
- Modules object is deprecated HOT 2
- Use on dev machines. HOT 3
- undefined request params HOT 2
- Timeouts on heroku HOT 4
- Dial Syntax? HOT 2
- Error 'Could not get number ' HOT 3
- Changing "hostname" to "base_url" HOT 1
- broken again latest express HOT 1
- Setting the URI for a call/text doesn't change the request type HOT 1
- Need more documentation of Twiml.Gather(); HOT 2
- Facilitate Paging? HOT 1
- autoUri is global, and is reported as problem for unit tests like mocha HOT 1
- Is this package still supported? HOT 2
- Documentation link is outdated
- express dependency missing from package.json HOT 2
- Library incompatible with Heroku, etc HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-twilio.