sip
sip copied to clipboard
Outbound : Hitting CPS limit in telecom provider but create_sip_participant takes too long to report error
participant_request = CreateSIPParticipantRequest(
sip_trunk_id="****",
sip_call_to=to_number,
sip_number=from_number,
room_name=call_uuid,
participant_identity=f"sip-User-{call_uuid}",
participant_name="SIP Caller",
krisp_enabled=True,
wait_until_answered=True
)
participant = await livekit_api.sip.create_sip_participant(participant_request)
Problem:
If wait_until_answered=False, the API returns immediately, but the code assumes success even if the SIP call fails.
If wait_until_answered=True, the call will eventually raise an error when the SIP server rejects it (e.g., hitting CPS limits), but it takes a long time to return. This makes retries slow and inefficient.
Is there anything else i can use here to get faster reporting ?
@davidzhao
@dennwc Is there anyway i contribute to this ?
Yes, please provide a PCAP for the failed call so that we can examine it and see why it took so long to return an error back.