Audiocodes
Prerequisites
- An AudioCodes account. Sign up at: https://voiceaiconnect.audiocodes.io/
- A ServisBOT Bot, configured with some intents (or flow) and a welcome message.
Configure AudioCodes for your bot
- Create a new, plain text secret for your engagement adapter. In this example, we’re giving it the name
audiocodecsvoicesecret, and it’s value should be some unique secret string - a UUID is a good candidate here. Save both the created secret SRN, and the value of the secret - we’ll use both later. - Create a new endpoint for your bot of the following format:
- (Replace references to
yourorgwith your organization name,voicebotwith the name of your bot, andSecretwith the SRN of the secret we just created)
- (Replace references to
{
"Address": "yourorg-audiocodecsvoiceadapter",
"OutboundBotReference": "voicebot",
"InboundBotReference": "voicebot",
"Organization": "yourorg",
"EngagementType": "AudioCodesVoice",
"Status": "online",
"AllowedDomains": ["*"],
"EngagementConfig": {
"Secret": "srn:vault:eu-private-1:yourorg:secret:audiocodecsvoicesecret",
"ContextParameters": [
]
},
"Useragent": "useragent",
"TargetBotReference": "voicebot",
"Name": "yourorg voicebot adapter endpoint"
}- Create an AudioCodes bot of type
AudioCodes Bot API. Give the bot some name. - Set up the Bot URL to be of the format
https://conversation.REGION.servisbot.com/v1/ORG/ENDPOINTADDRESS- Replace
REGIONwith your servisbot region (e.g.eu1,us1) - Replace
ORGwith your organization name - Replace
ADDRESSwith the address of the endpoint you created - Add any ContextParameters you may wish to collect - e.g.
caller,callee- note this may collect PII in the form of a phone number. These properties will be available at root level in context, e.g.msg.payload.context.caller
- Replace
- Set the Token to be the value of the secret we created above.
- Validate the bot configuration - it should result in a green success message. If not, check your configuration & try again.
- Finish setting up audio codes - choose your STT and TTS vendors, along with the voice.
WebSocket Mode
- To use websocket mode, follow the steps above except
- Use
AudioCodesWebSocketVoiceas theEngagementTypewhen creating the endpoint - Set the Bot URL in the format
wss://wsconv.REGION.servisbot.com?organization=$ORG&endpoint=$ENDPOINTADDRESS
- Use
Test your Bot
Now, wire your AudioCodes bot to a purchased phone number, and try dialling it. You should be able to interact with your bot over voice.
Last updated on