Testing the Assistant
# support
d
Can I start testing the assistant to call a real phone number? How do I do that?
v
Hi there! 👋 Yes, you can definitely test your assistant to call a real phone number in Vapi! I'd be happy to walk you through the process. Here's how you can test your assistant by calling a real phone number: 1. **Configure a Phone Number**: First, you'll need to set up a phone number. You can do this by: - Creating a phone number directly through Vapi (via the dashboard or the
/phone-numbers
endpoint) - Importing one from Twilio - Creating a free phone number by going to the "Phone Numbers" tab in your Vapi dashboard and clicking "Create a Phone Number" (currently only US numbers can be directly created) [According to the documentation](https://docs.vapi.ai/phone-calling), you have multiple options for obtaining a phone number to work with. 2. **Attach Your Assistant to the Phone Number**: In the Inbound area of the phone number detail view, select your assistant from the dropdown to ensure it will pick up incoming calls. This step is necessary to utilize Voice AI with that number. 3. **Make a Call**: You have two options to test your assistant: - **API Method**: Use the
/call/phone
endpoint to place an outbound call from one of your phone numbers. You can specify a temporary assistant or reuse an existing one by providing its ID. - **Direct Method**: Use the phone number associated with your AI assistant to make a call to your friend's number. 4. **API Call Example**: Here's a CURL command example you can use (just update with your actual values):
Copy code
curl -X POST https://api.vapi.ai/call \\
   -H "Authorization: Bearer YOUR_API_KEY" \\
   -H "Content-Type: application/json" \\
   -d '{
   "phoneNumberId": "YOUR_PHONE_NUMBER_ID",
   "customer": {
     "number": "CUSTOMER_PHONE_NUMBER"
   },
   "assistant": {
     "firstMessage": "Hello! This is a test call."
   },
   "name": "TestCall"
   }'
If you encounter any issues, make sure the assistant ID is correctly set on your phone number and check the debugging artifacts sent to your server for more detailed information. Is there anything specific about testing your assistant with a real phone number that you'd like me to explain further? Sources: - [How to test the assistant by calling a real phone number in Vapi](https://docs.vapi.ai/phone-calling) - [Methods for testing the assistant in Vapi](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336733353570992210)
k
Hey, Darth Spam, checking if this is resolved for you ?
4 Views