Closed raoulduivestein closed 4 years ago
You can send the incoming number to dialogflow as a parameter in the initial event if you want. Is that what you are looking to do?
Yes great! How can i do that?
you would need to change this line:
endpoint.api('dialogflow_start', `${endpoint.uuid} ${dfOpts.project} ${dfOpts.lang} ${welcomeEvent}`);
to something like this:
const params = {callingNumber: this.req.callingNumber};
endpoint.api('dialogflow_start', `${endpoint.uuid} ${dfOpts.project} ${dfOpts.lang} ${welcomeEvent} '${JSON.stringify(params)}'`);
Thanks Dave this works great!
Thanks for this great project! 🥇 How can I use a incomming number in a dialogflow webhook?