From 31ce172373b20aaa3be757c13548873ad0f2b321 Mon Sep 17 00:00:00 2001 From: shivamp-vg <158497872+shivamp-vg@users.noreply.github.com> Date: Mon, 22 Apr 2024 20:05:16 +0530 Subject: [PATCH] Update README.md --- telephony-bot-api/type-callback/README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/telephony-bot-api/type-callback/README.md b/telephony-bot-api/type-callback/README.md index 6b9fbaa5..c728c46a 100644 --- a/telephony-bot-api/type-callback/README.md +++ b/telephony-bot-api/type-callback/README.md @@ -1 +1,21 @@ -# Callback Type Telephony Bot API # \ No newline at end of file +# Callback Type Telephony Bot API # + +HOW TO RUN A BOT: + +1) Install the python packages installed : flask, requests and json + +2) Run the python script that starts a flask server on port 80. +Run: python .py + +3) You can have a service like ngrok to a web url that create a tunnel and provides a weburl that redirects APIs the locally running server. +Run the ngrok server by the command: ngrok http 80 + +4) You can add the weburl provided by ngrok in the telephony bot, as the Inbound speech callback url. Make sure the connect method is set to callback which is the POST API endpoint. + +5) You can now call the bot and it should work. + + + +NOTE: + +The above steps is an easy way to test the bot script. Ideally you have to create a server and host it, that way the POST which invokes the bot session will be available on web.