Skip to content

[ENHANCEMENT REQUEST] - Add SIP Participant SIP endpoint status code on participant_joined & participant_disconnected events #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AutoScrape123TX opened this issue Feb 21, 2025 · 5 comments

Comments

@AutoScrape123TX
Copy link

AutoScrape123TX commented Feb 21, 2025

Please just add sip status code to the webhook and room event we receive when a SIP participant join or disconnect so we could behave on our SIP endpoints as we want without relying solely on Livekit events. For example you could add "sip_status_code" on participant_joined and disconnected events if it's a SIP participant.

For production use case we want to infer deeply on the SIP status code to modify our workflow and take decision. Not only if participant has "SIP_TRUNK_FAILURE", while this disconnect_reason is never reachable from room events.

@AutoScrape123TX
Copy link
Author

I really think this would be the best details we could get for a SIP workflow.

@AutoScrape123TX AutoScrape123TX changed the title ADD SIP STATUS CODE TO WEBHOOK Add SIP Participant SIP endpoint status code on participant_joined & participant_disconnected events Feb 24, 2025
@hu-kang
Copy link

hu-kang commented Mar 11, 2025

I also agree with this. Currently, when creating a SIP participant, it is immediately added to the room regardless of whether the participant has answered the call or not. This is not very rigorous in actual business scenarios. I hope that trigger events for such scenarios can be added to facilitate users in better implementing their business logic.

@AutoScrape123TX
Copy link
Author

@hu-kang No I'm not saying that and actually the SIP participant event flow is well detailed : https://docs.livekit.io/sip/sip-participant/#sip-attributes

But we don't have the sip status code granularity for errors or failure.

@AutoScrape123TX AutoScrape123TX changed the title Add SIP Participant SIP endpoint status code on participant_joined & participant_disconnected events [ENHANCEMENT REQUEST] - Add SIP Participant SIP endpoint status code on participant_joined & participant_disconnected events Mar 11, 2025
@hu-kang
Copy link

hu-kang commented Mar 12, 2025

@hu-kang No I'm not saying that and actually the SIP participant event flow is well detailed : https://docs.livekit.io/sip/sip-participant/#sip-attributes

But we don't have the sip status code granularity for errors or failure.

Sorry, I misunderstood. The situation I encountered was that when creating an SIP participant, the participant did not answer the call but was already added to the room, and we could not capture the event of the missed call.

@AutoScrape123TX
Copy link
Author

@hu-kang Actually you can with infer status with

@room.on("participant_attributes_changed")
        def _on_participant_attributes_changed(changed_attributes: Dict, participant: rtc.RemoteParticipant):
            print(participant.attributes["sip.callStatus"])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants