Repository navigation
Conversation
With manage-shared-appearance enabled, a line-seize from one device deleted every 'seized' row for the shared line before inserting its own. Two phones on the same shared line therefore overwrote each other's seize on every seize refresh (Yealink refreshes about every 6 s), so appearance LEDs flipped between phones, and releasing a seize also cleared seizes held by others. A seize for an appearance already in use by another device was never refused. Changes: * Store the line-seize subscription Call-ID in sip_dialogs.call_id so each seize row has an owner. * Seize refresh and seize release only remove the subscriber's own seize row (plus legacy rows without an owner and expired rows). * Refuse a line-seize with 480 when the requested appearance is held by another device's live seize or by an active call. * When call state changes, only clear seizes that have expired or whose appearance is now used by a call, instead of all seizes on the line. * Fix the 'line-seized' event name typo in sync_sla(). Tested with two Yealink T54W (fw 96.87.0.20) on one shared line: seize on different keys, seize race on the same key, outbound, inbound ring-all, public hold/retrieve, barge-in and call pull all behave correctly. A scripted SIP test that seizes from two clients reproduces the bug before the change and passes after it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With
manage-shared-appearance=true, aline-seizeSUBSCRIBE from one device deletes everyseizedrow for the shared line before inserting its own (sofia_presence_handle_sip_i_subscribe). With two or more phones on one shared line:sync_sla()with clear=true) clears all seizes on the line.Also fixes the
event='line-seized'typo insync_sla()(a subscription is never stored with that event name).Change
sip_dialogs.call_id, so each seize row has an owner.line-seizewith480 Temporarily Unavailableif the requested appearance is held by another device's unexpired seize or by an active call.No schema change:
sip_dialogs.call_idalready exists. Single file:src/mod/endpoints/mod_sofia/sofia_presence.c.Testing
FreeSWITCH 1.11.1 (Debian 12), two Yealink T54W (fw 96.87.0.20) on one shared line:
A scripted SIP client test (two UDP clients sending authenticated
line-seizeSUBSCRIBEs and checkingsip_dialogs) fails 4/6 checks before the change and passes 6/6 after it.🤖 Generated with Claude Code
https://claude.ai/code/session_017S4mpb5sfS2fgB3E8j2Byi