Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

dev: Deploy TTS/STT backend in another region

Clémence Lesné34372c6046e1
diff --git a/Makefile b/Makefile
index 134fd8c..740aebc 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,7 @@ tunnel_name := call-center-ai-$(shell hostname | sed 's/[^a-zA-Z0-9]//g' | tr '[
tunnel_url ?= $(shell res=$$(devtunnel show $(tunnel_name) | grep -o 'http[s]*://[^"]*' | xargs) && echo $${res%/})
# App location
app_location := westeurope
+cognitive_communication_location := westeurope
openai_location := southcentralus
search_location := northeurope
# App configuration
@@ -133,6 +134,7 @@ deploy:
'agentPhoneNumber=$(agent_phone_number)' \
'botCompany=$(bot_company)' \
'botName=$(bot_name)' \
+ 'cognitiveCommunicationLocation=$(cognitive_communication_location)' \
'openaiLocation=$(openai_location)' \
'searchLocation=$(search_location)' \
--template-file bicep/main.bicep \
diff --git a/bicep/app.bicep b/bicep/app.bicep
index 0f6c940..68e9f92 100644
--- a/bicep/app.bicep
+++ b/bicep/app.bicep
@@ -3,6 +3,7 @@ param adaVersion string
param agentPhoneNumber string
param botCompany string
param botName string
+param cognitiveCommunicationLocation string
param gptBackupContext int
param gptBackupModel string
param gptBackupVersion string
@@ -285,15 +286,15 @@ resource appUserCommunication 'Microsoft.Authorization/roleAssignments@2022-04-0
}
resource cognitiveCommunication 'Microsoft.CognitiveServices/accounts@2023-10-01-preview' = {
- name: '${prefix}-${location}-communication'
- location: location
+ name: '${prefix}-${cognitiveCommunicationLocation}-communication'
+ location: cognitiveCommunicationLocation
tags: tags
sku: {
name: 'S0' // Only one available
}
kind: 'CognitiveServices'
properties: {
- customSubDomainName: '${prefix}-${location}-communication'
+ customSubDomainName: '${prefix}-${cognitiveCommunicationLocation}-communication'
}
}
diff --git a/bicep/main.bicep b/bicep/main.bicep
index 918163d..d7daf94 100644
--- a/bicep/main.bicep
+++ b/bicep/main.bicep
@@ -3,6 +3,7 @@ param adaVersion string = '2'
param agentPhoneNumber string
param botCompany string
param botName string
+param cognitiveCommunicationLocation string
param gptBackupContext int = 16385
param gptBackupModel string = 'gpt-35-turbo'
param gptBackupVersion string = '0125'
@@ -45,6 +46,7 @@ module app 'app.bicep' = {
agentPhoneNumber: agentPhoneNumber
botCompany: botCompany
botName: botName
+ cognitiveCommunicationLocation: cognitiveCommunicationLocation
gptBackupContext: gptBackupContext
gptBackupModel: gptBackupModel
gptBackupVersion: gptBackupVersion