Voice
Configuring a Phone Number with Autopilot
To configure your Autopilot Assistant for Twilio Programmable Voice follow the following steps:
- Go to your Console Phone Numbers page.
- Buy or select the phone number you want to use for your Assistant.
- In Voice & Fax Configuration select Webhook.
- Fill in the URL in the following format:
-
https://channels.autopilot.twilio.com/v1/<ACCOUNT_SID>/<ASSISTANT_SID>/twilio-voice
- Click Save Settings.
- Make a call to that phone number - you should get an Assistant Responder webhook.
<Autopilot> TwiML noun
To configure your Autopilot Assistant for Twilio Programmable Voice follow the following steps:
Example 1: Connect call to Autopilot
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Connect action="https://www.example.com/autopilot">
<Autopilot>UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</Autopilot>
</Connect>
</Response>
Example 2: Connect call to Autopilot to a specific task
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Connect action="https://www.example.com/autopilot">
<Autopilot TargetTask="voice_welcome">UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</Autopilot>
</Connect>
</Response>
Example 3: Connect call to Autopilot and pass Inbound Context
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Connect action="https://www.example.com/autopilot">
<Autopilot Memory='{"CarModel":"Diablo","CarMake":"Lamborghini","CarYear":"2019"}'>UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</Autopilot>
</Connect>
</Response>
Autopilot Parameters
Parameter | Description |
TargetTask |
A string representing the unique name of the destination Task. If no TargetTask is provided, the destination task is determined by the natural language understanding. TargetTask is useful when you want to control what task a user is routed to. Any call sent with a TargetTask parameter will start the Autopilot session on that task. This will override the initiation task speccified in the defaults. |
Memory |
Lets you send Inbound Context to Autopilot. Should be a JSON string containing key-value pairs to insert into the Autopilot memory before starting a dialogue with the bot. Useful for passing data stored in third party systems like a CRM into Autopilot to deliver a more contextual experience. |
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.