API Voice doubts

Hi all!

Im trying to make an API voice in order to control calls from other servers with the possibiity of using 2 scripts that I have on my Asterisk 16 server (one for TTS and other for STT)

For example, an incoming call:

  1. Asterisk server to other server —> Hey! there is and incoming call and the client says that wants to talk with Tom. (using speech-to-text that I have already)
  2. Other server to asterisk server ----> Ok, say to the client “sorry Tom is busy now, try again in a few minutes” and hungup de call (using text-to-speech that I have already)

Im trying to do this with ARI and websockets. Well, the first step is OK, via wscat and stasis the other server can know what client said in text format. I send that information to [args] statis vía dialplan, and then the other server can see this in the statis start/stop debug.

But now, I don’t know how the other server can use my TTS script (.agi) and order me to say that on the channel.

I tried to do the hello-world with curl and it works fine, maybe can I do the same with the second step?

Anyway, Im not sure if Im focusing good this project with ARI, can u help me?

Some ideas?

Thanks in advance,
BR

Hi for me I use PHPAGI files stored inside this location: /var/lib/asterisk/agi-bin/

I use Google TTS and STT embedded inside this phpagi script to do the translations, and then store the recorded audio file in a certain location. Then in the Dialplan I use Playback() to play the recorded audio file from that location.

This can be done all in a single server using Google TTS API or any other compatible API, at the end tts is simply playback an audio file to the end user. also this is easier using AGI instead of ARI

Hi @Dav and @ambiorixg12 Thanks for responses,

I have this in producition in an only server but need to know if its possible to handle the call or dialplan with this .agi scripts from outside using a websocket.

I mean, do exactly the same that you both said but from external server with some via.
I don’t know if is better ARI,AGI, or any other but don’t know how to handle it.

Thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.