Call Terminate#
- class pywa.types.calls.CallTerminate#
Represents a call termination event.
This update arrives when a call is terminated, either by the business or the user.
- Variables:
id – The call ID.
metadata – The metadata of the call (to which phone number this call was made or received).
from_user – The user who participated in the call, either as caller or callee.
timestamp – The timestamp when this update is sent (in UTC).
event (CallEvent) – The calling event (always
TERMINATE).direction (CallDirection) – Whether the call was initiated by the business or the user.
status (CallTerminateStatus) – The status of the call (either
FAILEDorCOMPLETED).start_time (datetime.datetime | None) – The start time of the call in UTC (Only if the call was picked up).
end_time (datetime.datetime | None) – The end time of the call in UTC (Only if the call was picked up).
duration (int | None) – The duration of the call in seconds (Only if the call was picked up).
tracker (_CallbackDataT | None) – The tracker that the call is initiated with.
shared_data – Shared data between handlers.
- class pywa.types.calls.CallTerminateStatus#
Represents the status of a call termination event.
- Variables:
FAILED – The call failed.
COMPLETED – The call was completed successfully.