https://retellai.com/?utm_source=discord&utm_medium=seo logo
Phone number through retell post webhook data
# ❓・ai-evy-support
f
@AI Evy Phone number through retell post webhook data. Only test works.
a
Thanks for tagging me @fivecaps. I'll look through relevant sources and get back to you shortly.
### Answer For phone numbers to post webhook data in Retell AI, you need to configure webhooks at the phone number level [(1) ]() [(2) ]() [(3) ]() . When creating or updating a phone number, you can set the
inbound_webhook_url
parameter [(1) ]() [(3) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.create({
 inbound_webhook_url: "<https://example.com/inbound-webhook%22>
}) ;
[(1) ]() For inbound calls, the webhook will POST to your endpoint with call information [(4) ]() . Your endpoint should handle the request and return a JSON response with a 2xx status code . If webhooks only work for testing but not for actual calls, this could be because you need to set the webhook at the phone number level specifically for inbound calls to work [(5) ]() . The webhook configuration differs between inbound and outbound calls . Check out these potentially useful sources: [Setup guide]() , [Inbound call webhook]() , [Create Phone Number]()
​ To learn more, see the sources I considered: [[1] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) [[2] Get Phone Number](https://docs.retellai.com/api-references/get-phone-number) [[3] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) [[4] Inbound call webhook](https://docs.retellai.com/features/inbound-call-webhook) [[5] webhook is not able to receive the inbound call data. It works for outbound calls though](https://discord.com/channels/1186424376300679209/1399815679275958292) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy what about outbound calls
a
Thanks for the follow-up, @fivecaps. I'll get back to you soon.
### Answer For outbound calls, you can set webhook data directly when creating the call using the Create Phone Call API [(1) ]() . You can include dynamic variables and custom SIP headers in your outbound call request :
Copy code
javascript
const registerCallResponse = await retell.call.createPhoneCall({
 from_number: '+14157774444', // replace with the number you purchased
 to_number: '+12137774445', // replace with the number you want to call
 retell_llm_dynamic_variables: { // replace with the dynamic variables you want to send (optional)
 name: 'John Doe',
 blood_group: 'B+'
 }, 
 custom_sip_headers: { // replace with custom sip headers you want to send (optional)
 X-Custom-Header: 'Custom Value'
 }
}) ;
For outbound calls, you can also receive webhook data through call webhooks that send real-time updates when calls are initiated, end, and analyzed . You can set up webhooks to receive information like transcript, recording, latency tracking, etc. Additionally, you can use the Get Call API to retrieve call information after the call ends .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Outbound calls (make calls)](https://docs.retellai.com/deploy/outbound-call) ​
f
@AI Evy I think I fixed it. There appears to be an issue with Telynx provider. It works with Twilio
a
Thanks for the follow-up, @fivecaps. I'll get back to you soon.
### Answer Great to hear you resolved the issue! Your experience aligns with what's documented about telephony provider compatibility. Retell AI supports elastic SIP trunking with multiple providers including Twilio, Telnyx, and Vonage [(1) ]() . While Telnyx is officially supported, provider-specific configurations can sometimes cause issues with webhook delivery or call handling . Twilio has detailed integration guides with Retell AI and tends to have more standardized SIP trunking implementations . When importing phone numbers from custom telephony providers, the termination URI format is critical - for Twilio elastic SIP trunks, it always ends with ".pstn.twilio.com" [(2) ]() . If you encounter similar issues with other providers in the future, you can also consider using Retell's partner Jambonz, which provides dedicated support for Retell users and handles static IP requirements that some telephony providers need [(1) ]() .
​ To learn more, see the sources I considered: [[1] Custom Telephony Overview](https://docs.retellai.com/deploy/custom-telephony) [[2] Import Phone Number](https://docs.retellai.com/api-references/import-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.