bitter-appointment-81509
11/14/2025, 9:53 AMasync def main():
livekit_api = api.LiveKitAPI()
request = CreateSIPParticipantRequest(
room_name=args.room,
sip_trunk_id=args.trunk,
sip_call_to=args.phone,
participant_identity=f"sip-{args.call_id}",
krisp_enabled = True,
wait_until_answered = True,
play_dialtone = True,
)
try:
participant = await livekit_api.sip.create_sip_participant(request)
print(f"Successfully created {participant}!")
except Exception as e:
print(f"Error creating SIP participant: {e}")
finally:
await livekit_api.aclose()
#update_call_status(args.code, args.call_id,args.prenom, "closed")
if __name__ == "__main__":
asyncio.run(main())tall-airline-16756
11/14/2025, 9:53 AMtall-airline-16756
11/14/2025, 9:53 AMsip_trunk_id matches an outbound SIP trunk that’s properly set up in your LiveKit configuration.
• The sip_call_to parameter should be formatted in E.164 style.
• Confirm that your authorization token includes the SIP call grant to allow the call.
• Review optional parameters like krisp_enabled, wait_until_answered, and play_dialtone to ensure they’re set just the way you need.
If you run into any specific issues or see error messages, please don’t hesitate to share them—I’m here to help you work through it!
Sources: Make outbound calls | LiveKit docs | SIP APIs | LiveKit docs | ivr-nagivator/flask_livekit/extension.py | lib/livekit/sip_service_client.rbbitter-appointment-81509
11/14/2025, 9:54 AMtall-airline-16756
11/14/2025, 9:54 AMdelete_room API to end the entire room. This will disconnect everyone, including the SIP participant. It’s the simplest way to wrap up the call right away.
• Transfer the SIP Participant: If you’d prefer to keep the room going but want to disconnect just the SIP participant, the TransferSIPParticipant API lets you transfer them out smoothly.
If you’d like, I’m here to help you with the steps for either option—just let me know!
Sources: Call forwarding | LiveKit docs | pkg/sip/server.go | Agents telephony integration | LiveKit Docs