<?php
require 'vendor/autoload.php';
use Vobiz\VobizClient;
use Vobiz\Calls\Requests\MakeCallRequest;
$authId = getenv('VOBIZ_AUTH_ID');
$client = new VobizClient(
apiKey: $authId,
authToken: getenv('VOBIZ_AUTH_TOKEN'),
);
$response = $client->calls->makeCall(
$authId, // your account Auth ID
new MakeCallRequest([
'from' => '14155551234', // Vobiz-enabled number or SIP URI
'to' => '+919876543210', // destination in E.164 format
'answerUrl' => 'https://example.com/answer', // webhook returning VobizXML
'answerMethod' => 'POST',
])
);