Hi team, I wanted to check whether the data hooks capability includes the Provider Call ID. If not, what is the best way to retrieve this data?
Not sure what you are asking. What datahook do you mean? What are you trying to do?
Thanks @CWilson — let me be more precise. By data hooks I meant the SDK-side collection described in Data hooks, specifically ctx.make_session_report().
What I’m actually after: the SIP dashboard shows a Provider Call ID for each call, which I use to find that call logs in my SIP provider’s portal.
Three questions:
- Which ID is it? Is the dashboard’s “Provider Call ID” the same value as
sip.callIDFull(“Trunk provider SIP call ID”) in the SIP participant attributes, or is it the provider-generated ID passed via SIP X headers that the troubleshooting guide describes? - How do I collect it? Is reading
participant.attributesin my entrypoint the right approach, and is that value guaranteed to be populated by the time the participant joins? The SIP participant docs note that attributes set viaheaders_to_attributesupdate asynchronously — should I be listening forparticipant_attributes_changedor callinglk.sip.GetRemoteHeadersinstead? - Non-Twilio trunks: there’s
sip.twilio.callSidfor Twilio. For other providers, isheaders_to_attributesthe recommended way to capture the provider’s own call ID, or is there a first-class path?
Hi, I didn’t generate a report to double-check but I checked the source code and SIP stats aren’t logged there.
The provider call ID is exposed as sip.callIDFull, documented here:
So, you can read it from there when the SIP participant joins and log it as needed.