https://retellai.com/?utm_source=discord&utm_medium=seo logo
When using custom telephony (twilio) connected via...
# ❓・bug-report
r
In Retell I have a number imported connected via SIP trunking. I am able to make the outbound call perfectly fine, however I notice that I do not receive a twilio call SID. Making the call as following:
Copy code
const callResponse = await retellClient.call.createPhoneCall({
        from_number: from,
        to_number: to,
        metadata: metadata || {},
      });
      const telephonyCallId = callResponse.telephony_identifier;

      console.log("Call Response:", callResponse);

      console.log("Call SID:", telephonyCallId);
      console.log("Retell Call ID:", callResponse.call_id);
I get valid call responses and retell call id's, but nothing from twilio. From the documentation, I can't find anything I may be missing, guidance on this would be greatly appreciated as we require tracking this information. Thanks!
c
change this line const telephonyCallId = callResponse.telephony_identifier; to const telephonyCallId = callResponse.telephony_identifier.twilio_call_sid;
r
@chiraggupta1910_87616 Thanks for the response, but the object is empty
Copy code
console.log(telephonyCallId?.twilio_call_sid)
yields
undefined
@chiraggupta1910_87616
Copy code
{
    "interaction_type": "call_details",
    "call": {
        "call_id": "call_d11dbca53659bfef41bc6a2a647",
        "call_type": "phone_call",
        "agent_id": "agent_e063ae7920b01496f295148e34",
        "call_status": "registered",
        "latency": {},
        "metadata": {
            "campaign_id": "PLACEHOLDER - req has real value",
            "carrier": "PLACEHOLDER - req has real value
"
        },
        "cost_metadata": {
            "telecommunication": "custom",
            "llm_model": "custom",
            "voice_provider": "elevenlabs"
        },
        "call_cost": {
            "total_duration_unit_price": 0,
            "product_costs": [],
            "total_one_time_price": 0,
            "combined_cost": 0,
            "total_duration_seconds": 0
        },
        "opt_out_sensitive_data_storage": false,
        "from_number": "PLACEHOLDER - req has real value",
        "to_number": "PLACEHOLDER - req has real value",
        "direction": "outbound"
    }
}
above is the response with some information redacted that we receive from the create phone call api.
Hi @chiraggupta1910_87616 any update?
c
Make sure to use the latest version of https://www.npmjs.com/package/retell-sdk in your dev dependencies?
r
I was on 4.18.0 which had the field present in the SDK from what I can see, currently testing 4.19.0 to see if it changes anything, but from the github changelog I don't see any changes that should affect this..
@chiraggupta1910_87616 I've verified the SDK upgrade still leads to the same issue.
f
Talked to our team "it's populated when it's piped through, and it should be piped through for purchased and imported number. Would not work if it's dial to sip."
r
@Florian - support @ Retell AI Our number is imported. Its present under our phone numbers in the retell console, and I am using create phone call directly rather than dialing to SIP and register phone call. Can you confirm the behaviour? Let me know and I can provide any additional context necessary for our setup or account.
Hi @Florian - support @ Retell AI , @chiraggupta1910_87616 , any assistance on this would be greatly appreciated. I can confirm that our number is imported and not dial to SIP. It is quite important for us to track the twilio SID as part of our data.
f
Can you provide some call ids where the problem occured and it was not populated?
y
Same issue here
Any updates on this?
m
@chiraggupta1910_87616 i have the same issue any updates here ?
r
@yhgalvao @mohab_rageh_tixae_55281 I’m the requester not Retell support but didn’t post my resolution. We found that we get the Twilio sid later in the call from the get call api, so for our use case we just kept initial track using the retell call id and retrieved the Twilio one later.
y
Yeah, I noticed that about a month ago and we are kind of doing the same thing. Thank you, @raviraina_