We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to set the custom dialogflow session id (so that it captures the phone number of the user ) when starting the dialogflow connection ?
The text was updated successfully, but these errors were encountered:
@srijan14 that is interesting. Were you able to figure out a good solution handling this?
Sorry, something went wrong.
You can get the caller id by Adding this code in the server.js file
First, change the request format into JSON by adding these two lines
app.use(express.urlencoded({ extended: true })); app.use(express.json()) // To parse the incoming requests with JSON payloads
Then get the number from your post route like this
app.post("/twiml", (request, response) => { const phoneNumber = request.body.From; response.setHeader("Content-Type", "application/xml"); // ngrok sets x-original-host header const host = request.headers['x-original-host'] || request.hostname; response.render("twiml", { host, layout: false }); });
No branches or pull requests
Is it possible to set the custom dialogflow session id (so that it captures the phone number of the user ) when starting the dialogflow connection ?
The text was updated successfully, but these errors were encountered: