Skip to main content
Connect a voice-agent platform such as LiveKit, ElevenLabs, Retell or Vapi over Session Initiation Protocol (SIP) with SIP trunking: an inbound trunk sends calls to your number on to the platform, and an outbound trunk lets the platform place calls through Plivo. First, check a platform host (use yours if it isn’t ElevenLabs). This needs no login and places no call:
Then plivo sip connect plan checks your number and prints every command to run, in order, changing nothing. As you run the plan’s steps, --platform on sip uris create, sip ip-acl create and sip trunks create fills in the platform’s SIP host, port, transport and IP addresses from Plivo’s integration guide.

Check that the platform answers

Example output for the TLS test above, with illustrative addresses, timings and certificate dates:
  • Exit codes: 0 reachable; 1 the URI itself is invalid; 3 unreachable, or unknown (a UDP host that didn’t answer the OPTIONS request).
  • No INVITE is ever sent, so no call is placed. Quote a URI that contains ;, or the shell cuts the command there.
  • Hosted platforms often ignore SIP from addresses they don’t know, so unknown on UDP doesn’t mean calls will fail.
  • A host given without a port that publishes a SIP service (SRV) DNS record gets a warning naming the record’s target; the test still checks the host you gave.
  • Each step waits up to 5 seconds, or --timeout when given. -o json returns checks[] (each with name, status, detail and duration_ms) and result.

Plan the connection

You need to be logged in. Both flags are required: --number <number>, a voice-enabled number on your account, and --platform <name>: livekit, elevenlabs, retell or vapi. The plan checks that the number is on this account with voice enabled, then prints the steps:
After the steps it lists what to set up on the platform’s side, any recommendation such as --secure, and a link to Plivo’s guide for that platform.
  • Replace placeholders before running a step. Use a SIP username of 5 to 20 letters and digits, and supply SIP_PASSWORD securely: 5 to 20 characters with at least one of ~!@#$%^&*()_+.
  • Preview each step, then run it without --dry-run. A preview creates no IDs, so use the real URI UUID from step 1 in step 3, and the real credential from step 2 in step 4.
  • Step 5 changes routing immediately when you remove --dry-run. Save the previous application or trunk ID first so you can restore it. Then complete the platform-side steps the plan prints, including importing or assigning the number to your agent.
  • With -o json the plan returns checks[], requests[] and next_actions[]. If a check fails, the plan stops and exits non-zero; with -o json it prints only the error, with the checks so far under error.context.checks.

Indian numbers

For an Indian number the plan also runs the compliance check that plivo numbers update runs (see Numbers). A number with no know your customer (KYC) compliance attached, or with an application that isn’t accepted, fails the compliance check, and the plan stops with the KYC steps in the hint. The plan also checks that the platform supports Indian numbers:

What --platform fills in

Values come from Plivo’s integration guide for each platform. Flags you pass always win. A host or transport the guide doesn’t list is used as given, with a warning.
  • On sip trunks create, --platform only checks the trunk against the guide. It warns when the authentication isn’t the guide’s, and names the command that makes a missing URI, credential or IP list.
  • Where the guide uses secure trunking (TLS for signaling, Secure Real-time Transport Protocol (SRTP) for audio), the CLI prints recommended: --secure but never turns it on, because secure trunking is billed per minute. Add --secure yourself if you want it, and turn it on on the platform’s side too.
  • Each preset records the date its values were checked against the guide. If that date is more than 90 days old, the CLI warns you to check the values against the platform’s docs.
  • Retell won’t import a number without an outbound trunk’s domain and credential, even for inbound-only use, so create the outbound trunk too.

Next

Once calls flow, see Check and diagnose a call for who hung up, call quality and a plain-English explanation of any call. All SIP commands are on the SIP trunking page.