File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3- from typing import Optional
3+ from typing import Optional , Union
4+
5+ from livekit .protocol .connector_whatsapp import AcceptWhatsAppCallRequest
6+ from livekit .protocol .sip import CreateSIPParticipantRequest , TransferSIPParticipantRequest
7+
8+ # Requests that carry wait_until_answered / ringing_timeout and share the
9+ # phone-dialing timeout behavior.
10+ DialRequest = Union [
11+ CreateSIPParticipantRequest ,
12+ TransferSIPParticipantRequest ,
13+ AcceptWhatsAppCallRequest ,
14+ ]
15+ """@private"""
416
517# Calls that dial a phone (SIP CreateSIPParticipant with wait_until_answered and
618# TransferSIPParticipant; WhatsApp AcceptWhatsAppCall with wait_until_answered)
1527"""@private"""
1628
1729
18- def dial_timeout (user_timeout : Optional [float ], request ) -> float :
30+ def dial_timeout (user_timeout : Optional [float ], request : DialRequest ) -> float :
1931 """Request timeout (seconds) for a phone-dialing call: the user-supplied
2032 value (or the dial default) raised, when needed, to stay at least
2133 RINGING_TIMEOUT_MARGIN above the request's ringing_timeout.
You can’t perform that action at this time.
0 commit comments