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.create → calls.make_call, add auth_id, and url/method → answer_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.
Serve the answer URL (Flask / FastAPI / Express)
When Vobiz rings your number it fetches youranswer_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.
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 throughclient.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.
| Action | Twilio | Vobiz |
|---|---|---|
| Play audio | client.calls(sid).update(twiml="<Play>…") | client.play_audio.call(auth_id, call_uuid, urls=) |
| Speak text | client.calls(sid).update(twiml="<Say>…") | client.speak_text.call(auth_id, call_uuid, text=) |
| Send DTMF | client.calls(sid).update(twiml="<Play digits=…>") | client.dtmf.send_dtmf(auth_id, call_uuid, digits=) |
| Start recording | client.calls(sid).recordings.create() | client.record_calls.start_recording(auth_id, call_uuid) |
| Hang up | client.calls(sid).update(status="completed") | client.live_calls.hangup_call(auth_id, call_uuid) |
Look up a live call
Twilio reads live and completed calls off oneclient.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 withavailable_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 itsCF… 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.
<Conference> element — is in Conferences.
List call records
Completed-call history is a first-classcdr resource on Vobiz, with rich filters for reporting.
Validate a webhook signature
Both platforms sign inbound webhooks so you can prove the request came from them. Twilio’sRequestValidator 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 ofApiError) the same way you caught Twilio’s TwilioRestException — with the HTTP status and response body available on the exception.