require_once("SwitchvoxRequest.php");
$request = new SwitchvoxRequest("YOUR.PBX.IP.OR.HOSTNAME", "admin", "ADMIN.PASSWORD");
$requestParams = array( 'account_ids' => array('account_id' => array( 1101, 1102) ) );
$response = $request->send("switchvox.extensions.getInfo", $requestParams);
print_r($response);
I get the following error.
Fatal error: Class 'HttpRequest' not found in C:\xampp\htdocs\switchboard\php\SwitchvoxRequest.php on line 32
I assume this is because the pecl_http extension is not enabled (among other things?). As soon as line 32 tries to create the HttpRequest object the script dies.
I've Googled for hours and tried numerous things to enable the extensions noted in the getting started section but without success. Has anyone had this problem? Is there a straightforward tutorial somewhere on configuring PHP to work with the Switchvox API?
Thanks for your help.
