colossal-lock-10836
09/15/2025, 7:48 PMtall-airline-16756
09/15/2025, 7:48 PMtall-airline-16756
09/15/2025, 7:49 PMmax_call_duration parameter found in SIP-related configurations. This parameter is available in the CreateSIPParticipantRequest and trunk configuration objects like SIPInboundTrunkInfo and SIPOutboundTrunkInfo within the LiveKit Python SDK. It’s important to specify it using the google.protobuf.duration_pb2.Duration type.
Here’s a friendly example of how to set it in a `CreateSIPParticipantRequest`:
from livekit.protocol.sip import CreateSIPParticipantRequest
from google.protobuf.duration_pb2 import Duration
# Set maximum call duration to 45 minutes
max_duration = Duration()
max_duration.FromSeconds(2700) # 45 * 60 seconds
# Create the request object
request = CreateSIPParticipantRequest(
sip_trunk_id="trunk_123",
sip_call_to="+1234567890",
room_name="meeting_room",
participant_identity="caller1",
max_call_duration=max_duration # Apply the duration limit
)
Similarly, you can easily configure an inbound trunk with a max duration like this:
from livekit.protocol.sip import SIPInboundTrunkInfo
from google.protobuf.duration_pb2 import Duration
max_duration = Duration()
max_duration.FromSeconds(3600) # 1 hour
trunk_info = SIPInboundTrunkInfo(
sip_trunk_id="inbound_trunk_001",
numbers=["+1234567890"],
max_call_duration=max_duration,
# ... other fields
)
If you have any questions or need more help, please don’t hesitate to ask—I’m here to support you!
Sources: pkg/sip/participant.go | livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/realtime/... | livekit-protocol/livekit/protocol/sip.py | SIP APIs | LiveKit Docs | rpc/sip.pb.go