Home:ALL Converter>How to run a local command on my server using google assistant?

How to run a local command on my server using google assistant?

Ask Time:2019-03-29T16:40:09         Author:WhyDoYouDie

Json Formatter

I'm a student write a simple chatbot for an asterisk telephone server. The AGI script just says a hello message, asks if the person is looking for a group ( sales / support etc ) or for a person, than asks which person / group and redirects them to the group / person, if the person isn't available it gives you the options to eigther, redirect to a colleague ( person in the same que ) , to speak a message into his voicemail, or to wait until the person is available.

I had to do some 'hard coding' of strings to make the scipt work for example if a person is not available the caller could say('yhea send me to a COLLEAGUE' or 'yhea you can REDIRECT' , or 'I don't mind talking to SOMEONE else' ) for this part i would like to make use of some simple AI that could understand the user better and give propper responses, I however have no expirience with AI at all but love to learn it.

I'm making use os a centos server with free asterisk PBX installed, with my AGI script coded in Python.

Is there a way to use the google assistant / dialog flow to return a parameter to my script / server if it matched? I was able to put together the badjokegenerator: BadJokeGenerator but i'm wondering if / how i could send something to my server / script so i could for example let my script redirect a caller to the person he asked for.

Author:WhyDoYouDie,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/55413418/how-to-run-a-local-command-on-my-server-using-google-assistant