Skip to content

Commit 832cb9a

Browse files
committed
fix: publish_agent_context in on_call_ringing, add on_call_ringing to fork_targets_parallel
1 parent b910d13 commit 832cb9a

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

src/addons/cc

Submodule cc updated from b08513d to 3a0aba4

src/proxy/proxy_call/sip_session.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3643,6 +3643,16 @@ impl SipSession {
36433643
}
36443644

36453645
// Race the forked INVITEs – first 200 OK wins
3646+
// Fire on_call_ringing hooks now that callees are ringing.
3647+
// Use the first target's AOR for agent identity.
3648+
if !self.server.session_hooks.is_empty() && !targets.is_empty() {
3649+
self.meta.routed_callee = Some(targets[0].aor.to_string());
3650+
let ctx = self.session_hook_ctx();
3651+
for hook in self.server.session_hooks.iter() {
3652+
hook.on_call_ringing(&ctx).await;
3653+
}
3654+
}
3655+
36463656
let mut failures = 0u32;
36473657
let mut last_error = into_callee_err(
36483658
&StatusCode::TemporarilyUnavailable,

0 commit comments

Comments
 (0)