https://retellai.com/?utm_source=discord&utm_medium=seo logo
When importing a phone number via SIP trunk, what ...
# ❓・ai-evy-support
c
@AI Evy When importing a phone number via SIP trunk, what value should we store as the phone identifier? Do you return a phone_number_id or should we use the phone number itself (E.164 format)? To sync SIP credentials to Retell, what API endpoint should we use? Is it POST /import-phone-number with credentials in the body, or a separate endpoint? When deleting a SIP trunk imported phone number, do we need to call a Retell API to unregister it? If yes, which endpoint? What is the exact format for the Termination URI we should provide when importing? Example: {trunk_name}.pstn.twilio.com or different format?
a
Thanks for tagging me @Client Nexus. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Import Phone Number](https://docs.retellai.com/api-references/import-phone-number) [[2] Telnyx](https://docs.retellai.com/deploy/telnyx) [[3] Vonage](https://docs.retellai.com/deploy/vonage) ​
### Answer --- 1. Phone Identifier Use the phone number itself in E.164 format as the unique identifier. The API documentation states the
phone_number
field is "used as the unique identifier for phone number APIs." [(1) ]() 2. API Endpoint for Importing with SIP Credentials Use
POST /import-phone-number
with credentials in the body. The required fields include: -
phone_number
(E.164 format) -
termination_uri
-
sip_trunk_auth_username
(optional) -
sip_trunk_auth_password
(optional) 3. Deleting a SIP Trunk Imported Number Yes, you need to call the Retell API to delete/unregister the number. The documentation mentions you can "delete it from the dashboard or via the Delete Number API." [(2) ]() [(3) ]() The endpoint is referenced as
/api-references/delete-phone-number
. [(2) ]() 4. Termination URI Format The format depends on your telephony provider: [(1) ]() [(2) ]() [(3) ]() - **Twilio**:
someuri.pstn.twilio.com
(always ends with
.pstn.twilio.com
) [(1) ]() - **Telnyx**: Based on your SIP region, e.g.,
sip.telnyx.com
[(2) ]() - **Vonage**: Use the termination SIP URI from your Vonage dashboard configuration [(3) ]() Example from the API documentation: [(1) ]()
Copy code
"termination_uri": "someuri.pstn.twilio.com"
---
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.