How to access caller Phone Number in Google Dialogflow Phone Gateway?












0














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?










share|improve this question




















  • 1




    Question has nothing to do with machine-learning - kindly do not spam the tag (removed).
    – desertnaut
    Nov 23 '18 at 12:31
















0














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?










share|improve this question




















  • 1




    Question has nothing to do with machine-learning - kindly do not spam the tag (removed).
    – desertnaut
    Nov 23 '18 at 12:31














0












0








0







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?










share|improve this question















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?







google-cloud-functions dialogflow chatbot






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 12:31









desertnaut

16.5k63567




16.5k63567










asked Nov 23 '18 at 12:08









Piyush MauryaPiyush Maurya

527516




527516








  • 1




    Question has nothing to do with machine-learning - kindly do not spam the tag (removed).
    – desertnaut
    Nov 23 '18 at 12:31














  • 1




    Question has nothing to do with machine-learning - kindly do not spam the tag (removed).
    – desertnaut
    Nov 23 '18 at 12:31








1




1




Question has nothing to do with machine-learning - kindly do not spam the tag (removed).
– desertnaut
Nov 23 '18 at 12:31




Question has nothing to do with machine-learning - kindly do not spam the tag (removed).
– desertnaut
Nov 23 '18 at 12:31












2 Answers
2






active

oldest

votes


















1














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.






share|improve this answer





























    0














    Google has put together a sample introducing Dialogflow fulfullment for telephony, which should help:



    https://github.com/dialogflow/fulfillment-telephony-nodejs



    The specific code you're looking for is in functions/index.js, lines 40 - 43:



    agent.handleRequest(agent => {
    let [date, time, name, group, phone] = [agent.parameters.date, agent.parameters.time, agent.parameters.name, agent.parameters.groupN, agent.parameters.phone];


    You can access a user's phone number via the agent.parameters.phone parameter






    share|improve this answer





















      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53446468%2fhow-to-access-caller-phone-number-in-google-dialogflow-phone-gateway%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      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.






      share|improve this answer


























        1














        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.






        share|improve this answer
























          1












          1








          1






          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.






          share|improve this answer












          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 3 at 15:43









          Dan DoustonDan Douston

          113




          113

























              0














              Google has put together a sample introducing Dialogflow fulfullment for telephony, which should help:



              https://github.com/dialogflow/fulfillment-telephony-nodejs



              The specific code you're looking for is in functions/index.js, lines 40 - 43:



              agent.handleRequest(agent => {
              let [date, time, name, group, phone] = [agent.parameters.date, agent.parameters.time, agent.parameters.name, agent.parameters.groupN, agent.parameters.phone];


              You can access a user's phone number via the agent.parameters.phone parameter






              share|improve this answer


























                0














                Google has put together a sample introducing Dialogflow fulfullment for telephony, which should help:



                https://github.com/dialogflow/fulfillment-telephony-nodejs



                The specific code you're looking for is in functions/index.js, lines 40 - 43:



                agent.handleRequest(agent => {
                let [date, time, name, group, phone] = [agent.parameters.date, agent.parameters.time, agent.parameters.name, agent.parameters.groupN, agent.parameters.phone];


                You can access a user's phone number via the agent.parameters.phone parameter






                share|improve this answer
























                  0












                  0








                  0






                  Google has put together a sample introducing Dialogflow fulfullment for telephony, which should help:



                  https://github.com/dialogflow/fulfillment-telephony-nodejs



                  The specific code you're looking for is in functions/index.js, lines 40 - 43:



                  agent.handleRequest(agent => {
                  let [date, time, name, group, phone] = [agent.parameters.date, agent.parameters.time, agent.parameters.name, agent.parameters.groupN, agent.parameters.phone];


                  You can access a user's phone number via the agent.parameters.phone parameter






                  share|improve this answer












                  Google has put together a sample introducing Dialogflow fulfullment for telephony, which should help:



                  https://github.com/dialogflow/fulfillment-telephony-nodejs



                  The specific code you're looking for is in functions/index.js, lines 40 - 43:



                  agent.handleRequest(agent => {
                  let [date, time, name, group, phone] = [agent.parameters.date, agent.parameters.time, agent.parameters.name, agent.parameters.groupN, agent.parameters.phone];


                  You can access a user's phone number via the agent.parameters.phone parameter







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 27 '18 at 0:01









                  Max WiederholtMax Wiederholt

                  1768




                  1768






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53446468%2fhow-to-access-caller-phone-number-in-google-dialogflow-phone-gateway%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      What visual should I use to simply compare current year value vs last year in Power BI desktop

                      How to ignore python UserWarning in pytest?

                      Alexandru Averescu