fix: stop no-answer retry racing dialplan hangup + fix event catalog validation #11

Merged
arystanbek merged 1 commits from fix/retry-channel-resolution-and-event-catalog into main 2026-08-30 20:04:05 +00:00
2 changed files with 11 additions and 1 deletions
+5 -1
View File
@@ -938,7 +938,11 @@ def retry_escalation_no_answer(session, *, call_id: str, dial_outcome: str) -> N
)
attempted_ids = json.loads(escalation.attempted_agent_ids_json or "[]")
channel = _resolve_handoff_channel(session, link)
# Use the already-known, actively-maintained channel name directly instead of
# _resolve_handoff_channel()'s live AMI CoreShowChannels re-discovery: that
# round-trip can take ~10s, which races (and loses) against the dialplan's
# own short MusicOnHold-then-hangup wait window for this exact retry path.
channel = str(link.channel_name or "").strip() or _resolve_handoff_channel(session, link)
required_skills = json.loads(escalation.required_skills_json or "[]")
next_agent = _reserve_routing_agent(
call_id=call_id,
+6
View File
@@ -363,6 +363,12 @@ class VoiceEventIn(BaseModel):
"recording.ready",
"call.connected",
"call.transferred",
"AgentReserved",
"AgentRinging",
"AgentNoAnswer",
"AgentConnected",
"TransferCompleted",
"TransferFailed",
]
call_id: str
interaction_id: str | None = None