Call Types#
- class pywa.types.calls.CallingSettings#
Represents the calling settings for a business phone number.
See Configure Call Settings for more details.
- Variables:
status (pywa.types.calls.CallingSettingsStatus | None) β Enable or disable the Calling API for the given business phone number.
call_icon_visibility (pywa.types.calls.CallIconVisibility | None) β Configure whether the WhatsApp call button icon displays for users when chatting with the business. See Call Icon Visibility for more details.
call_hours (pywa.types.calls.CallHours | None) β Allows you to specify and trigger call settings for incoming calls based on your timezone, business operating hours, and holiday schedules.
callback_permission_status (pywa.types.calls.CallbackPermissionStatus | None) β Configure whether a WhatsApp user is prompted with a call permission request after calling your business.
sip (pywa.types.calls.SIPSettings | None) β Configure call signaling via signal initiation protocol (SIP). Note: When SIP is enabled, you cannot use calling related endpoints and will not receive calling related webhooks.
- class pywa.types.calls.CallingSettingsStatus#
Represents the status of calling settings.
- class pywa.types.calls.CallIconVisibility#
Represents the visibility of the call icon.
- class pywa.types.calls.CallbackPermissionStatus#
Represents the status of callback permission.
- class pywa.types.calls.SIPServer#
Represents a SIP server configuration.
- Variables:
hostname (str) β The host name of the SIP server. Requests must use TLS.
port (int | None) β The port within your SIP server that will accept requests. Requests must use TLS. Default port is
5061.request_uri_user_params (dict[str, str] | None) β An optional field for passing any parameters you want included in the user portion of the request URI used in our SIP INVITE to your SIP server.
sip_user_password (str | None) β The password for the SIP user (only if
include_sip_credentialsis True).app_id (int) β The app ID that configures the SIP server.
- class pywa.types.calls.SIPStatus#
Represents the status of SIP (Session Initiation Protocol).
- class pywa.types.calls.STRPKeyExchangeProtocol#
Represents the SRTP key exchange protocol.
- Variables:
DTLS β Datagram Transport Layer Security (DTLS) is used for key exchange.
SDES β Session Description Protocol Security Descriptions (SDES) is used for key exchange.
- class pywa.types.calls.CallHours#
Represents the call hours settings for a business.
Maximum of 2 entries allowed per day of week
open_time must be before close_time
Overlapping entries not allowed
- Variables:
status (pywa.types.calls.CallingSettingsStatus) β Enable or disable the call hours for the business (If call hours are disabled, the business is considered open all 24 hours of the day, 7 days a week).
timezone_id (str) β The timezone that the business is operating within. Learn more about supported values for timezone_id.
weekly_operating_hours (list[pywa.types.calls.WeekDay]) β The operating hours schedule for each day of the week.
holiday_schedule (list[pywa.types.calls.HolidaySchedule] | None) β An optional override to the weekly schedule, Up to 20 overrides can be specified. Note: If holiday_schedule is not passed in the request, then the existing holiday_schedule will be deleted and replaced with an empty schedule.
- class pywa.types.calls.WeekDay#
Represents a day of the week with its opening and closing times.
You can use the subclasses for specific days (e.g.,
Monday,Tuesday, etc.) to create instances with predefined day names.
- Variables:
day_of_week (str) β The day of the week (e.g., βMONDAYβ, βTUESDAYβ).
open_time (datetime.time) β The opening time in 24-hour format (e.g., β0400β for 4:00 AM).
close_time (datetime.time) β The closing time in 24-hour format (e.g., β2200β for 10:00 PM).
- class pywa.types.calls.Tuesday#
Bases:
WeekDayRepresents Tuesday with its opening and closing times.
- class pywa.types.calls.Wednesday#
Bases:
WeekDayRepresents Wednesday with its opening and closing times.
- class pywa.types.calls.Thursday#
Bases:
WeekDayRepresents Thursday with its opening and closing times.
- class pywa.types.calls.Saturday#
Bases:
WeekDayRepresents Saturday with its opening and closing times.
- class pywa.types.calls.HolidaySchedule#
Represents a holiday schedule with a date and opening/closing times.
- Variables:
date (datetime.date) β The date of the holiday.
start_time (datetime.time) β The opening time in 24-hour format (e.g., β0000β for midnight).
end_time (datetime.time) β The closing time in 24-hour format (e.g., β2359β for 11:59 PM).
- class pywa.types.calls.CallPermissions#
Represents the call permissions to specific WhatsApp user.
Read more about Call Permissions.
- Variables:
permission (pywa.types.calls.CallPermission) β The call permission status and expiration time.
actions (list[pywa.types.calls.CallPermissionAction]) β A list of actions that can be performed with the call permission.
- class pywa.types.calls.CallPermission#
Represents a call permission with its status and expiration time.
- Variables:
status (pywa.types.calls.CallPermissionStatus) β The current status of the permission.
expiration_time (datetime.datetime | None) β The time at which the permission will expire in UTC timezone.
- class pywa.types.calls.CallPermissionStatus#
Represents the status of a call permission.
- Variables:
NO_PERMISSION β No permission granted.
TEMPORARY β Temporary permission granted.
- class pywa.types.calls.CallPermissionAction#
Represents an action that can be performed with the call permission.
- Variables:
action_name (str) β The name of the action (e.g., βsend_call_permission_requestβ).
can_perform_action (bool) β Whether the action can be performed.
limits (list[pywa.types.calls.CallPermissionActionLimit]) β A list of limits associated with the action.
- class pywa.types.calls.CallPermissionActionLimit#
Represents a limit for a specific action that can be performed with the call permission.
- Variables:
time_period (str) β The time period for which the limit applies, represented in ISO 8601 format (e.g., βPT24Hβ for 24 hours).
max_allowed (int) β The maximum number of actions allowed within the specified time period.
current_usage (int) β The current number of actions taken within the specified time period.
limit_expiration_time (datetime.datetime | None) β The Unix time at which the limit will expire in UTC timezone (optional).