Reputation: 2015
I have activated Dialogflow Phone Gateway and anyone can call on my Google number and interact with Dialogflow. I want to access caller number when someone call to my Dialogflow phone number. I have enabled fullfilment using cloud functions for firebase. I want to access caller phone number in cloud function?
Upvotes: 3
Views: 3124
Reputation: 3435
I don't give dialogflow phone number in marketing at all, and I give a twilio phone number and as soon as someone call to that number i note down the caller phone number and redirect call to dialogflow phone number so my customer start talking to dialogflow.
https://github.com/dialogflow/dialogflow-fulfillment-nodejs/issues/285
May be this workaround is for you
Upvotes: 0
Reputation: 41
After digging through this example (https://github.com/dialogflow/fulfillment-telephony-nodejs), I found that agent.parameters.phone
in the Firebase fulfillment is accessing parameters that were manually gathered, as defined in the json for one of the intents: Line 68: (https://github.com/dialogflow/fulfillment-telephony-nodejs/blob/master/dialogflow-agent/intents/makeRes.json).
This is standard DialogFlow functionality. It does not represent session metadata, which I think is what you were asking for. As such, the incoming phone number is not accessible.
Upvotes: 4