This article presents - start to finish - the steps involved in building a Telephony Bot application. We reference existing How-To articles or blog posts as much as possible. (Note: in some of the documentation you may still encounter the old name for the Telephony Bot API, which was RTC API.)
- If you do not already have it - create a developer account on Voicegain.
- Once you log into Voicegain Web Console, you will need to switch to the "Telephony Bot API" mode - this is done using the orange menu in the header.
- Depending on whether your application will be handling inbound or outbound calling:
- For inbound calling your can access Voicegain Telephony Bot app either using TDM phone numbers or using a SIP INVITE to SIP URI
- For TDM phone numbers your can purchase them directly from Voicegain - here is how.
- For SIP INVITE - each Telephony Bot App has a unique SIP URI - here is how you can connect e.g. Twilio to Voicegain SIP URI
- For outbound calling - you have to use 3rd party CPaaS to initiate an outbound call and then bridge it to the Telephony App using SIP
- Here is an example script how to do it using Twilio.
- Here is a script how to do it using SignalWire.
- And here is how to do it using Telnyx.
- For inbound calling your can access Voicegain Telephony Bot app either using TDM phone numbers or using a SIP INVITE to SIP URI
- Before you start implementing your Telephony Bot logic and if you are new to Callback/Webhook style API here is an outline of how that works. Your app logic will need to be implemented behind a webservice that is reachable from Voicegain Cloud via some URL.
- Once you know the URL of your telephony bot logic, you can configure a new Telephony Bot App from the Web Console - here is how.
- Now you can start coding your Telephony Bot app logic.
- You can access the API documentation here (requires login into Web Console).
- Here is an example of a very simple app showing turn by turn callback requests and responses.
- For prompt playback we use Google TTS. It supports SSML. This help article lists examples of some SSML commands that we have verified to work.
- If you need to use acoustic models other than the default English, here is a help article describing how to switch a model.
- Sometimes you will not be coding the application logic from scratch but instead using a bot framework. In that case you will need to write "glue" webservices that interface Voicegain Telephony Bot API to your Bot runtime.
- Here is an example of how we did it for RASA.
- Debugging:
- Web Console gives you access to the Session information of in-progress and completed Telephony Bot Sessions - the Call Sessions item in the Left Hand Menu. If you enabled recording and transcription for your Telephony Bot App, you will be able to access them there (Listen button)
- If you want to share call recordings you can download them using this workaround or this API.
If your telephony Apps are more in IVR style rather than a Voice Bot, you can use and modify our Declarative IVR script to help you develop such IVR apps very fast.
If you have any questions just ask and we will answer them and add to our documentation.
Comments
0 comments
Please sign in to leave a comment.