Skip to content

[fix] trunk_ids Assignment Error in SIPDispatchRuleUpdate #468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

benhmill
Copy link
Contributor

@benhmill benhmill commented Jul 16, 2025

Overview

LiveKit's SIPDispatchRuleUpdate is a protobuf message where fields like trunk_ids must be set during initialization.

Problem

Attempting to assign trunk_ids after instantiation raised the following runtime error:

AttributeError: Assignment not allowed to message, map, or repeated field "trunk_ids" in protocol message object.

This is due to protobuf’s restriction against direct assignment to message or repeated fields after construction.

Fix

Set trunk_ids during SIPDispatchRuleUpdate construction using ListUpdate(set=...), ensuring proper initialization and serialization by the protobuf engine.

Protobuf disallows direct assignment to message fields like  after initialization,
which was causing an AttributeError. This commit sets  during SIPDispatchRuleUpdate
construction using ListUpdate(set=...), ensuring proper serialization and avoiding runtime failure.
@CLAassistant
Copy link

CLAassistant commented Jul 16, 2025

CLA assistant check
All committers have signed the CLA.

@benhmill benhmill changed the title Fix trunk_ids assignment error in SIPDispatchRuleUpdate [FIX] trunk_ids Assignment Error in SIPDispatchRuleUpdate Jul 16, 2025
@benhmill benhmill changed the title [FIX] trunk_ids Assignment Error in SIPDispatchRuleUpdate [fix] trunk_ids Assignment Error in SIPDispatchRuleUpdate Jul 16, 2025
Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix!

@davidzhao davidzhao merged commit 3625168 into livekit:main Jul 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants