如何使用 node.js 中 google dialogflow 的 OriginalDetectIntentRequest api 获取呼叫者的呼叫者 ID

How to get the caller ID of caller using OriginalDetectIntentRequest api of google dialogflow in node.js

当用户呼叫 Dialogflow phone 网关时,我应该能够检索他的 phone 号码。因此,我参考了 Dialogflow 版本 2 API,我发现了一个名为 OriginalDetectIntentRequest 的 API,它将调用的 ID 存储在有效负载中。我需要 node.js 代码来检索此来电显示。 (我是 Dialogflow 和 node.js 的新手)。谁能给我提供它的代码。

如果您升级您的计划,您将在您的 webhook 中获得以下详细信息,

{
    "responseId": "9b3b323a-2d37-43a4-8128-4aa5f8bf73c4-ab1309b0",
    "queryResult": {
        "queryText": "TELEPHONY_WELCOME",
        "action": "input.welcome",
        "parameters": {},
        "allRequiredParamsPresent": true,
        "fulfillmentText": "Welcome to my agent",
        "fulfillmentMessages": [
            {
                "platform": "TELEPHONY",
                "telephonySynthesizeSpeech": {
                    "text": "Welcome to my agent"
                }
            },
            {
                "text": {
                    "text": [
                        "Welcome to my agent"
                    ]
                }
            }
        ],
        "outputContexts": [
            {
                "name": "projects/wertyf-qcbtap/agent/sessions/BlvF7EW3RVGk96ZPZsP2_w/contexts/telephony_welcome"
            },
            {
                "name": "projects/wertyf-qcbtap/agent/sessions/BlvF7EW3RVGk96ZPZsP2_w/contexts/__system_counters__",
                "parameters": {
                    "no-input": 0,
                    "no-match": 0
                }
            }
        ],
        "intent": {
            "name": "projects/wertyf-qcbtap/agent/intents/c727997d-f9b0-4b58-a9d4-d6e47c15e868",
            "displayName": "Default Welcome Intent"
        },
        "intentDetectionConfidence": 1,
        "languageCode": "en"
    },
    "originalDetectIntentRequest": {
        "source": "GOOGLE_TELEPHONY",
        "payload": {
            "telephony": {
                "caller_id": "Anonymous"
            }
        }
    },
    "session": "projects/wertyf-qcbtap/agent/sessions/BlvF7EW3RVGk96ZPZsP2_w"
}