mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-01 08:59:46 +02:00
Merge branch 'main' of https://github.com/dograh-hq/dograh
This commit is contained in:
commit
adae7aec2d
4 changed files with 9 additions and 9 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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}",
|
||||||
|
|
|
||||||
|
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue