### Answer
Setting up a Retell agent as an extension in a phone system requires integrating with your existing telephony infrastructure through SIP trunking or API connections [(1) ](
) .
Based on the available sources, here are the key integration approaches:
Telephony System Integration
Retell AI supports integration with various telephony providers including Twilio and Vonage [(1) ](
) [(2) ](
) . The platform allows you to connect AI voice agents to your existing phone system infrastructure [(2) ](
) .
PBX Integration Considerations
When connecting to PBX systems, there's an important requirement: Retell requires phone numbers to follow E.164 format [(3) ](
) . If your PBX uses internal extensions (like "001") , you'll need to modify your routing logic to translate these into valid E.164 caller IDs before sending to Retell .
API-Based Setup
You can create agents programmatically using the Retell API [(4) ](
) . The create agent endpoint allows you to configure voice settings, response engines, and telephony integration parameters .
Version Management
When deploying agents for production use, you can use Retell's versioning system to lock in configurations and attach phone numbers to specific agent versions [(5) ](
) .
Custom Telephony Solutions
For complex PBX integrations, you may need to use intermediate platforms like Jambonz to bridge between yo