https://retellai.com/?utm_source=discord&utm_medium=seo logo
I can't make my agents send SMS messages
# ❓・ai-evy-support
a
@AI Evy I can't make my agents send SMS messages. Getting an errorthat no outbound agent ID is set up for phone number. I have our numbers with Twilio, and already connected via SIP Trunking. Retell Voice Agents are already using the phone numbers for inbound - that working fine. Please help to enable SMS services. https://cdn.discordapp.com/attachments/1302816169367044149/1407660103506727083/Retell_AI_Error-SMS.jpg?ex=68a6e921&is=68a597a1&hm=d1c14ba92321c345b20c1d31c1d8a80382829377e1afffa0df4c688196e570f5&
a
Thanks for tagging me @aguilepino. I'll look through relevant sources and get back to you shortly.
### Answer For your SIP trunked Twilio numbers to work with SMS, you need to configure an
outbound_agent_id
when importing or updating the phone number [(1) ]() [(2) ]() . When importing your Twilio number via SIP trunking, you can set the outbound agent using the Import Phone Number API [(1) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.import({
 phone_number: '+14157774444',
 termination_uri: 'someuri.pstn.twilio.com',
}) ;
console.log(phoneNumberResponse.inbound_agent_id) ;
If your number is already imported, you can update it to add an outbound agent using the Update Phone Number API [(2) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
 inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
 nickname: 'Frontdesk Number',
 outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
console.log(phoneNumberResponse.inbound_agent_id) ;
The key parameters you need to include are [(1) ]() [(2) ]() : - `outbound_agent_id`: Unique id of agent to bind to the number for outbound calls and SMS - `outbound_agent_version`: Version of the outbound agent (defaults to latest if not provided) Without an
outbound_agent_id
configured, the number cannot initiate outbound calls or SMS without an agent id override .
​ To learn more, see the sources I considered: [[1] Import Phone Number](https://docs.retellai.com/api-references/import-phone-number) [[2] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy the Twilio phone numbers are already imported (they're working for voice). How and where can I enable the SMS service. I've added my Account SID and Twilio Auth Token at least 10 times using the modal (Setup SMS Function) but nothing happens after hitting save. https://cdn.discordapp.com/attachments/1407660103590740101/1407663864492982312/Retell-Twilio_Setup_SMS_function.jpg?ex=68a6eca2&is=68a59b22&hm=5cb99a3e4ca3240181dd2c9355f10b1a66b2402d8127bd6985016022fcb86a9a&
a
Thanks for the follow-up, @aguilepino. I'll get back to you soon.
### Answer Based on the available sources, I don't have specific information about SMS service setup or configuration through the Retell AI dashboard interface. The documentation I have access to covers phone number management APIs but doesn't include details about SMS service configuration or the "Setup SMS Function" modal you mentioned. Since your Twilio numbers are already imported and working for voice calls, but you're experiencing issues with the SMS setup modal not saving your Twilio credentials, this appears to be a dashboard-specific configuration issue that isn't covered in the API documentation sources I have available. For this specific SMS setup issue where the modal isn't saving your Twilio Account SID and Auth Token, I'd recommend: - Visit [Contact Sales]() - Visit [) Would you like a general answer based on my knowledge about SMS configuration instead?
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.