Search code examples
pythonartificial-intelligenceasteriskgoogle-assistant-sdk

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


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.


Solution

  • The best way to do this is not through Google Assistant, but through Dialogflow. You can use the Dialogflow console to build your natural language processing model. Then you can use the Python Dialogflow console to send text to Dialogflow for intent matching and entity extraction.