In Dialogflow CX, I have used phone gateway. I want extract the caller ID of the user who calls the voice bot. According to the documentation, we can get the caller id from the payload field in webhook. But I dont see a payload field or caller id in the request in webhook. How can I extract the customer phone number who calls? Thanks in advance.
To understand the problem better, here is the sample code that just prints the contents of the request:
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/webhook', methods=['GET', 'POST'])
def webhook():
req = request.get_json(force=True)
print(req)
if __name__ == "__main__":
app.run(host='0.0.0.0',port=5000)