This commit is contained in:
Abhishek Kumar 2026-05-12 14:25:37 +05:30
commit adae7aec2d
4 changed files with 9 additions and 9 deletions

View file

@ -154,9 +154,7 @@ async def handle_telnyx_transfer_result(transfer_id: str, request: Request):
# from the webhook payload. The strategy at pipeline-end then only has # from the webhook payload. The strategy at pipeline-end then only has
# to join the caller into this conference. Idempotent on duplicate # to join the caller into this conference. Idempotent on duplicate
# webhooks: if conference_id is already stamped on the context, skip. # webhooks: if conference_id is already stamped on the context, skip.
conference_id = ( conference_id = transfer_context.conference_id if transfer_context else None
transfer_context.conference_id if transfer_context else None
)
if transfer_context and not conference_id: if transfer_context and not conference_id:
conference_id = await _seed_destination_conference( conference_id = await _seed_destination_conference(
transfer_context=transfer_context, transfer_context=transfer_context,

View file

@ -74,7 +74,9 @@ class TelnyxConferenceStrategy(TransferStrategy):
return joined return joined
except Exception as e: except Exception as e:
logger.error(f"[Telnyx Transfer] Failed to join caller into conference: {e}") logger.error(
f"[Telnyx Transfer] Failed to join caller into conference: {e}"
)
await self._cleanup_transfer_context(transfer_context.transfer_id) await self._cleanup_transfer_context(transfer_context.transfer_id)
return False return False
@ -166,9 +168,7 @@ class TelnyxHangupStrategy(HangupStrategy):
) )
return False return False
endpoint = ( endpoint = f"{TELNYX_API_BASE}/calls/{call_control_id}/actions/hangup"
f"{TELNYX_API_BASE}/calls/{call_control_id}/actions/hangup"
)
headers = { headers = {
"Content-Type": "application/json", "Content-Type": "application/json",
"Authorization": f"Bearer {api_key}", "Authorization": f"Bearer {api_key}",

View file

@ -92,7 +92,9 @@ def audit_definition(nodes, edges) -> list[dict]:
"source_type": src_type, "source_type": src_type,
"target_id": tgt, "target_id": tgt,
"target_type": tgt_type, "target_type": tgt_type,
"edge_label": (e.get("data") or {}).get("label") if isinstance(e.get("data"), dict) else None, "edge_label": (e.get("data") or {}).get("label")
if isinstance(e.get("data"), dict)
else None,
"reason": r, "reason": r,
} }
) )

File diff suppressed because one or more lines are too long