
Prerequisites
- Access to the Twilio platform.
Generic endpoint settings
Override snapshot connections
If you activate the Override Snapshot Connections toggle, the endpoint overrides the connections in the snapshot with connections from the project. If only the snapshot has a connection, the connection isn’t overridden. If necessary, you need to update such connections manually. To override the connection of the agent in production, you can:- Make the necessary changes in a staging environment, create a snapshot of the same agent, and select the snapshot in the endpoint settings. Deactivate the Override Snapshot Connections toggle.
- Import connections from another agent using a package. Activate the Override Snapshot Connections toggle.
Mocking
In the Advanced Settings section, you can toggle on the Enable Mocking setting to activate mocking for the endpoint. Mocking lets you change node behaviors and test how they perform through the endpoint without changing the original node settings. Make sure that you also activate mocking at the node level.Additional endpoint settings
You can use the following additional settings to customize the endpoint:- NLU connectors
- Data protection & analytics
- Transformer functions
- Real-time translation
- Session management
Endpoint-specific settings
How to set up
Configure in Cognigy
Create a Twilio endpoint
Create a Twilio endpoint
To create a Twilio Endpoint, follow these steps:
- Go to Deploy > Endpoints.
- On the Endpoints page, click + New Endpoint.
- In the New Endpoint section, do the following:
- Select the Twilio Endpoint type.
- Specify a unique name.
- Select a Flow from the list. Save changes.
- In the Twilio Settings section, configure the following settings:
- STT / TTS Language — select the language used by the Speech-to-Text (STT) and Text-to-Speech (TTS) services for messages exchanged between Twilio and Cognigy.
- Voice — select the delivery voice for your Twilio voice bot from the list of available Twilio voices.
- In the Configuration Information section, copy the Endpoint URL and save it for later use. Save changes.
Configure in Twilio
Get a phone number
Get a phone number
- Open the Twilio Console. Go to the Account Dashboard.
- In the left sidebar, select the Develop tab, then go to Phone Numbers > Manage > Buy a Number. Select the country and ensure the number supports voice messages. Activate Voice. You can search for area code, for example, 211, which shows numbers available for Düsseldorf, Germany. Select the number and click Buy.
- Some phone numbers require you to validate that your company operates in the same city or region. This approach is common for German numbers. To validate the number, read the Twilio documentation and upload proof of your company registration. The validation process can take up to 3 business days. US numbers don’t require this validation.
- Go to Active Numbers. Select the number, then go to Voice Configuration. From the A call comes in list, select Webhook. In the URL field, enter the Cognigy Endpoint URL. Click Save configuration.
Additional configuration
Trigger Twilio to initiate a call
Trigger Twilio to initiate a call
In addition to receiving calls from Twilio in Cognigy, you can also trigger Twilio to initiate a call.
-
Create a TwiML Bin in Twilio to handle the call. Twilio can host TwiML (Twilio Markup Language) for you. This TwiML tells Twilio what to do after the call connects. Use the following TwiML, replacing
your_endpoint_urlwith your valid Cognigy Endpoint URL:Copy the URL of the TwiML Bin for later use. -
Add an HTTP Request Node to your Cognigy voice Flow. To configure this Node to trigger Twilio to make a call and connect the call back to the Flow, set the following parameters: