Rezashelby created an issue (kamailio/kamailio#4768)
Currently Kamailio provides:
t_cancel_callid() → cancel all branches of a transaction
t_cancel_branches("this"|"others"|"all") → branch-aware cancellation from reply
context
However there does not appear to be a public API that allows cancellation of an
arbitrary branch of an existing transaction from outside branch/reply context.
Use Case
Applications implementing progressive or overlapping ringing ("wave ringing")
often need behavior such as:
t=0s Ring phone A
t=10s Add phone B
t=15s Stop ringing phone A
t=30s Stop ringing phone B
Today, adding branches can be done asynchronously via:
t_cell_append_branches(tindex, tlabel)
but there is no equivalent mechanism to selectively terminate a previously
created branch.
The only available alternatives are:
canceling the entire transaction
relying on per-branch FR timers
moving the logic into a B2BUA/application server
These approaches do not provide deterministic branch-level control from
external schedulers (rtimer, async workers, external controllers, etc.).
Proposed API
Something conceptually similar to:
t_cancel_branch(tindex, tlabel, branch_index)
or
t_cancel_branch_uri(tindex, tlabel, ruri)
or
t_cancel_branch_id(tindex, tlabel, branch_id)
where a specific branch of an active transaction can be canceled while sibling
branches continue ringing.
Expected Behavior
Given:
Transaction T
├─ Branch 0 -> Phone A
├─ Branch 1 -> Phone B
└─ Branch 2 -> Phone C
calling:
t_cancel_branch(T, 0)
would:
generate CANCEL only for Branch 0
leave Branch 1 and Branch 2 untouched
keep the transaction active
preserve normal TM state handling
Questions
Is there already an internal TM/TMX mechanism that supports this but is not
exposed?
Would exposing branch-level cancellation be considered acceptable for TM
architecture?
Are there concerns regarding RFC compliance or transaction state consistency
that would prevent such an API?
Version
Tested against Kamailio 6.x.
This frames the request around a legitimate architectural gap:
Kamailio supports out-of-band branch creation (t_cell_append_branches) but does
not appear to support out-of-band branch cancellation.
That argument will resonate with TM/TMX maintainers because it focuses on API
symmetry rather than a specific ring-group implementation.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4768
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!