mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-22 08:38:13 +02:00
fix: harden cloudonix cdr session validation
This commit is contained in:
parent
ace4903c0e
commit
f7b3dc1ceb
3 changed files with 29 additions and 2 deletions
|
|
@ -116,9 +116,11 @@ class StatusCallbackRequest(BaseModel):
|
|||
|
||||
disposition = data.get("disposition") or ""
|
||||
status = disposition_map.get(disposition.upper(), disposition.lower())
|
||||
session = data.get("session")
|
||||
call_id = session.get("token") if isinstance(session, dict) else ""
|
||||
|
||||
return cls(
|
||||
call_id=(data.get("session") or {}).get("token") or "",
|
||||
call_id=call_id or "",
|
||||
status=status,
|
||||
from_number=data.get("from"),
|
||||
to_number=data.get("to"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue