Skip to main content
Refactoring a Twilio 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 Twilio 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

Make an outbound call

The classic “change a few lines” migration: calls.createcalls.make_call, add auth_id, and url/methodanswer_url/answer_method.

Answer a call with XML (TTS + menu)

The XML builder maps verb-for-verb: VoiceResponse()ResponseElement(), and Gather keeps its name. On the builder, response.gather(...)resp.add_gather(...), nested .say().add_speak(), and str(response)resp.to_string(). Twilio’s input/timeout become Vobiz’s input_type/execution_timeout; num_digits carries over unchanged.
Vobiz emits the same document shape your TwiML app already returns - see the full verb table in TwiML → VobizXML, and validate the incoming request on your answer URL as shown in Webhooks.

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 your Twilio voice URL returned TwiML. Just build the response with vobizxml instead of VoiceResponse, and send it as application/xml.
Building the XML is the only thing that changes - swap VoiceResponse()/str(resp) for vobizxml.ResponseElement()/resp.to_string() and keep the same route. The full verb map is in TwiML → VobizXML, and validating the signed request on this endpoint is covered in Webhooks.

Control a live call

This is the biggest shape change - and the one that makes Vobiz code clearer. Twilio funnels every mid-call action back through client.calls(sid).update(...) (redirecting to fresh TwiML or setting status) and starts recording with client.calls(sid).recordings.create(). Vobiz gives each action its own resource keyed by (auth_id, call_uuid), so the intent lives on the method name.
Each Vobiz method name states the action, so live-call logic reads top-to-bottom. For the full resource map, see Voice Call API; to convert the TwiML you inline via update(twiml=…), use the TwiML → VobizXML reference.

Look up a live call

Twilio reads live and completed calls off one client.calls resource, filtered by status. Vobiz gives in-flight calls their own live_calls resource - pass status="live" to fetch or list what’s currently on the wire. Completed-call history lives in cdr.

Search and buy a phone number

Twilio searches the live carrier catalog with available_phone_numbers('US').local.list(...), reads .phone_number off a result, then provisions it with incoming_phone_numbers.create(phone_number=...). Vobiz browses ready-to-buy stock with list_inventory_numbers(...) and buys by E.164 with purchase_from_inventory(...) - a deterministic two-step flow where the E.164 number is the key.

Manage a conference

Twilio tracks a room by its CF… SID and each leg by its CallSid. Vobiz uses the room name as the join key and a member_id per participant - get_conference returns the room details and its member list in one call, and every control is its own verb.
Record the whole room on demand by name - start and stop whenever you like:
The full per-verb map - mute/unmute, deaf/undeaf, kick/hangup, and the <Conference> element - is in Conferences.

List call records

Completed-call history is a first-class cdr resource on Vobiz, with rich filters for reporting.
Filter CDRs by from_number, to_number, call_direction, hangup_cause, bridge_uuid, or sip_call_id - purpose-built for reporting. See Voice Call API for the live-vs-history split (live_calls for in-flight legs, cdr for completed history).

Validate a webhook signature

Both platforms sign inbound webhooks so you can prove the request came from them. Twilio’s RequestValidator rebuilds the full URL plus every sorted POST field and HMAC-SHA1s it against X-Twilio-Signature. Vobiz signs a short, deterministic string - baseURL + "." + nonce (query stripped) - with HMAC-SHA256, and sends it as X-Vobiz-Signature-V3 with the random nonce in X-Vobiz-Signature-V3-Nonce. No param-sorting step, reproducible in any language with the standard library.
On sub-account callbacks Vobiz also adds X-Vobiz-Signature-MA-V3, signed with the parent (main-account) token, so a parent can verify child traffic with the same validator. Full mapping and the Node version: webhooks & signatures.

Handle errors

Catch the Vobiz error types (all subclasses of ApiError) the same way you caught Twilio’s TwilioRestException - with the HTTP status and response body available on the exception.
Full verb table: TwiML → VobizXML.
Need a method that isn’t here? The full per-resource map is in Voice Call API, TwiML → VobizXML, and the rest of the Twilio migration section.