Skip to main content
Find a SIP trunk call and inspect its result. After logging in, list recent calls and copy a call UUID, its unique identifier:
Replace "<call_uuid>" with an ID from the list. SIP means Session Initiation Protocol, which controls calls between Plivo and your platform. Once your number is connected to a voice-agent platform (see Test and connect a platform), these commands tell you what happened on any call over the trunk:

Find the call

--since and --until (or --from-date and --to-date) filter on when a call ended, in UTC. You can also filter by --from-number, --to-number, --hangup-cause-code, --hangup-source and --stir-verification. See SIP trunking for every flag.

See which side hung up

sip calls get and sip calls insights both end with the side that ended the call:
The platform’s final SIP response always reads “not available”, because no API returns it. The SIP logs in the console have it: plivo open sip-call <call_uuid> opens that call there.

Check call quality

These field paths are relative to data in JSON output. Values are printed as the API returns them; the CLI does not calculate new quality scores. For example, use --query 'data.from.carrier' to select the originating carrier.

Ask what happened

diagnose reads the trunk call and explains what happened, the likely cause and the next steps. It works on SIP trunk calls only; for a Voice API call use plivo voice calls diagnose. With -o json it prints one result with what_happened, likely_cause, timeline, next_steps, hangup_cause_code, hangup_source, confidence and answer. It exits 3 if the analysis fails or stops early. The fields are described on Diagnose a call.
diagnose and plivo ask share a limit of 5 requests per 60 seconds per account. Only calls on your own account can be diagnosed.