I'm trying to use SIP `headers` according to the <...
# telephony
g
I'm trying to use SIP
headers
according to the CeateSIPParticipant documentation to send some useful information over SIP INVITE request, but Twilio seems to ignore all the headers I set I've attached the PCAPs for both the inbound and outbound call logs from Twilio. My custom headers are
X-Task-ID
,
User-to-User
and
X-User-to-User
. I’ve tried using both X- and User-to-User headers as described in Twilio’s documentation, but I’m not sure what I’m missing.
r
I see the header in the outgoing PCAP
g
yes but it is not received in the incoming
INVITE
, neither is it in the
OK
packet
r
That seems to be an issue outside of LiveKit. Right?
g
I’m not entirely sure. My understanding was that LiveKit passes those headers to the SIP participant so they can be used there. I just wanted to verify that I’m setting them correctly
i.e
Copy code
await ctx.api.sip.create_sip_participant(
    api.CreateSIPParticipantRequest(
        room_name=ctx.room.name,
        sip_trunk_id=outbound_trunk_id,
        sip_call_to=phone_number,
        participant_identity=participant_identity,
        wait_until_answered=True,
        headers={
            "X-Task-ID": task_id,
            "X-User-to-User": f"{task_id};encoding=hex",
            "User-to-User": task_id,
        },
    )
)
@refined-appointment-81829
r
I see them going out in the PCAP
Does the PCAP not have what you expect when you set them?
g
No, see the 4th frame (with protocal SIP/SDP). It just ignores all the headers I set through livekit, neither am I seeing them on the incoming invite in PCAP. I was thinking if that
headers
thing does actually work 🤔
r
4th frame of which pcap? Outgoing/
But my point is it was set in the INVITE that LiveKit sent right? Or is it not what you expected?
Invite.gif