sip icon indicating copy to clipboard operation
sip copied to clipboard

Outbound : Hitting CPS limit in telecom provider but create_sip_participant takes too long to report error

Open paraschhugani opened this issue 3 months ago • 3 comments

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.

paraschhugani avatar Oct 15 '25 10:10 paraschhugani

Is there anything else i can use here to get faster reporting ?

@davidzhao

paraschhugani avatar Oct 15 '25 10:10 paraschhugani

@dennwc Is there anyway i contribute to this ?

paraschhugani avatar Oct 15 '25 10:10 paraschhugani

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.

dennwc avatar Oct 16 '25 12:10 dennwc