Menu

Expand
Rate this page:

Voice

Configuring a Phone Number with Autopilot

To configure your Autopilot Assistant for Twilio Programmable Voice follow the following steps:

  1. Go to your Console Phone Numbers page.
  2. Buy or select the phone number you want to use for your Assistant.
  3. In Voice & Fax Configuration select Webhook.
  4. Fill in the URL in the following format:
  5. https://channels.autopilot.twilio.com/v1/<ACCOUNT_SID>/<ASSISTANT_SID>/twilio-voice
  6. Click Save Settings.
  7. 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.

Rate this page:

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.

Loading Code Sample...
        
        
        

        Thank you for your feedback!

        Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        thanks-feedback-gif