Skip to main content
Refactoring a Plivo app to Vobiz is mostly a tab-swap: same call flow, a few renamed methods, and an explicit auth_id. Each task below shows the Plivo code and the equivalent Vobiz code in Python and Node — copy the Vobiz tab.
Set your credentials once: AUTH_ID is your Vobiz Auth ID (MA_…), AUTH_TOKEN is your Auth Token. In the Vobiz SDK, api_key is the Auth ID, and every account-scoped method takes that auth_id explicitly.

Set up the client

import plivo

client = plivo.RestClient(AUTH_ID, AUTH_TOKEN)

Make an outbound call

The classic “change a few lines” migration: calls.createcalls.make_call, add auth_id, and to_to.
client.calls.create(
    from_='+14155551234',
    to_='+14165553434',
    answer_url='https://example.com/answer.xml',
    answer_method='POST',
)

Answer a call with XML (TTS + menu)

The XML builder mirrors plivoxmlResponseElement with add_* methods. GetDigits/GetInput become Gather (and add_get_digits is kept as an alias).
from plivo import plivoxml

resp = plivoxml.ResponseElement()
menu = resp.add_get_digits(action='https://example.com/menu', method='POST', num_digits=1)
menu.add_speak('Press 1 for sales, 2 for support.')
print(resp.to_string())

Serve the answer URL (Flask / FastAPI / Express)

When Vobiz rings your number it fetches your answer_url over HTTP — return the VobizXML from any web framework, exactly as you did with Plivo. Just build the response with vobizxml and send it as application/xml.
from flask import Flask, Response
from plivo import plivoxml

app = Flask(__name__)

@app.route('/answer', methods=['POST'])
def answer():
    resp = plivoxml.ResponseElement()
    resp.add_speak('Hello from Plivo.')
    return Response(resp.to_string(), mimetype='application/xml')

Control a live call

Plivo’s in-call actions live on calls.*; in Vobiz they’re dedicated resources keyed by (auth_id, call_uuid).
client.calls.play(CALL_UUID, urls='https://example.com/hold.mp3')   # play audio
client.calls.speak(CALL_UUID, text='Please hold.')                  # speak text
client.calls.send_digits(CALL_UUID, digits='1234')                  # send DTMF
client.calls.record(CALL_UUID)                                      # start recording
client.calls.hangup(CALL_UUID)                                      # hang up

Look up a live call

Retrieving a live call needs status="live" on Vobiz.
live = client.calls.get(CALL_UUID)
calls = client.calls.list(status='live')

Search and buy a phone number

available = client.numbers.search(country_iso='US', type='local')
client.numbers.buy('14155551234')

List call records

Completed-call history is a first-class cdr resource on Vobiz.
records = client.calls.list(limit=20)

Handle errors

Catch the Vobiz error types (all subclasses of ApiError) the same way you caught Plivo’s.
from plivo.exceptions import PlivoRestError

try:
    client.calls.make_call(...)
except PlivoRestError as e:
    print(e)
Converting an entire PlivoXML document at once? Use the interactive converter — it applies every verb/attribute rename automatically.
Need a method that isn’t here? The full per-resource map is in Voice Call API, Call-control XML, and the rest of the Plivo migration section.