how do I get to know the SIP outbound call's dispo...
# ask-ai
a
how do I get to know the SIP outbound call's disposition status like "REJECTED", "BUSY", "ANSWERED", "NOT_ANSWERED" which usually comes from the telecom company for which the SIP is configured to, they pass status code with above status messages.. how do I get it when I'm making an outbound call from livekit CLI OR livekit apis?
t
Thanks for reaching out, Hiren. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to help you understand how to retrieve the disposition status of SIP outbound calls (like REJECTED, BUSY, ANSWERED, NOT_ANSWERED) when working with LiveKit APIs or CLI. You can keep an eye on certain fields within the
SIPCallInfo
object that the SIP service provides. These include: • call_status: This tells you the current status of the call (for example,
SCS_ACTIVE
means the call was answered). • disconnect_reason: This explains why the call was disconnected (like
USER_REJECTED
if the call was rejected). • call_status_code: This holds SIP response codes (such as 486 for BUSY, or 603 for REJECTED). When using the API, you’d start a call with
CreateSIPParticipant
and then watch the response and any events that follow. If you prefer the CLI, you can use the
livekit-cli create participant
command along with a JSON payload that includes the outbound number and trunk ID. The CLI will then show you call info, including status codes and any errors. If you’d like me to walk you through some examples or provide more details, just let me know—I’m here to help! Sources: livekit/livekit_sip.pb.go | livekit-protocol/livekit/protocol/sip.pyi | Make outbound calls | LiveKit Docs | SIP outbound trunk | LiveKit Docs | lib/livekit/proto/livekit_sip_pb.rb