sparse-artist-79061
09/16/2025, 7:15 PMtall-airline-16756
09/16/2025, 7:15 PMtall-airline-16756
09/16/2025, 7:16 PMmax_call_duration parameter when creating a SIP participant through the CreateSIPParticipant API. This parameter lets you specify the maximum call length in seconds, and once that time is reached, the call will automatically end.
Here’s a friendly example using the Node.js SDK to guide you:
const participant = await client.createSipParticipant({
sipTrunkId: 'trunk-id',
sipCallTo: '+1234567890',
roomName: 'my-room',
maxCallDuration: 3600 // 1 hour in seconds
});
Just a quick note: the maximum duration is capped at 24 hours on the server side. If you’d like more help or examples in other SDKs, please don’t hesitate to ask—I’m here to support you!
Sources: SIP APIs | LiveKit Docs | pkg/sip/participant.go | packages/livekit-server-sdk/src/SipClient.ts | lib/livekit/sip_service_client.rb | livekit-protocol/livekit/protocol/sip.pyisparse-artist-79061
09/16/2025, 7:17 PMtall-airline-16756
09/16/2025, 7:18 PMmax_call_duration on SIP outbound calls just yet. But don’t worry—you can still set this by making a direct API call to the CreateSIPParticipant endpoint or by using one of our supported SDKs like Node.js, Python, or Ruby.
If you happen to be using a custom CLI wrapper around LiveKit’s API, just double-check that it supports the max_call_duration parameter. If not, here’s a handy example of how you can make a direct API call:
curl -X POST <YOUR_LIVEKIT_API_URL>/twirp/livekit.SIP/CreateSIPParticipant \
-H "Authorization: Bearer <your-access-token>" \
-H "Content-Type: application/json" \
-d '{
"sip_trunk_id": "your-trunk-id",
"sip_call_to": "+1234567890",
"room_name": "your-room-name",
"max_call_duration": "3600s"
}'
If you’d like, I’m here to help with more examples or guide you through using a specific SDK—just let me know!
Sources: livekit-protocol/src/livekit.rs | pkg/sip/participant.go | SIP APIs | LiveKit Docs | protobufs/rpc/io.proto | lib/livekit/sip_service_client.rb