happy-fall-9027
06/28/2025, 2:38 AMtall-airline-16756
06/28/2025, 2:38 AMtall-airline-16756
06/28/2025, 2:38 AMtry:
await ctx.api.sip.create_sip_participant(api.CreateSIPParticipantRequest(
# parameters...
))
print("call picked up successfully")
except api.TwirpError as e:
print(f"error creating SIP participant: {e.message}, "
f"SIP status: {e.metadata.get('sip_status_code')} "
f"{e.metadata.get('sip_status')}")
ctx.shutdown()
This will provide additional SIP-specific information like the status code (403) and status message (FORBIDDEN) to help with troubleshooting.
Sources: Agents telephony integration | LiveKit Docs | livekit.api API documentation