hello all! I'm passing in custom headers from Twi...
# telephony
a
hello all! I'm passing in custom headers from Twilio using a TwiML bin with the content below. I'm trying to verify that the custom header is coming cross into LiveKit. In my trunk I set the headersToAttributes to convert the X-ConversationId to the participant attribute "conversation_id", but I don't see the conversation_id participant attribute in the payload in the telephony call log. Do these participant attributes get displayed in the telephony call log on the gui, or am I only able to pull them using the SDK? Thanks!
Copy code
<Response>
<Dial>
<Sip username="username" password="password">sip:1234567890@abc.sip.livekit.cloud?X-ConversationId:1234567
</Sip>
</Dial>
</Response>
here is the json I have set for my trunk:
Copy code
{
  "sipTrunkId": "blah",
  "name": "My inbound trunk",
  "numbers": [
    "+1234567890"
  ],
  "authUsername": "username",
  "authPassword": "password",
  "headersToAttributes": {
    "X-ConversationId": "conversation_id"
  },
  "includeHeaders": "SIP_X_HEADERS"
}
r
Have you tried doing something like this in your agent?
Copy code
if participant.kind = rtc.ParticipantKind.PARTICIPANT_KIND_SIP:
    conversation_id = participant.attributes.get('conversation_id')
    <http://logger.info|logger.info>(f"Conversation ID: {conversation_id}")
s
@refined-appointment-81829
headersToAttributes
does not work. headers not passing to participant or room or webhooks there is a issue at github https://github.com/livekit/sip/issues/358
a
any update on this?
r
Conversation is in that GH issue.