PHP Calix Consumer Connect Plus API Repo
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This class was written in part of the Fiber Management System for the City of Sandy. It currently features the following operations

  • Subscriber
  • Creating
  • Updating
  • Selecting via _id
  • Selecting via customId
  • Deleting
  • Provisioning
  • Create
  • Update
  • Select via serialNumber/FSAN
  • Delete
  • Devices
  • Select via serialNumber/FSAN
  • TR-069 Methods

Please make sure the PHP CURL module is enabled on your system!!!


Include the class in your php page

$cc = new cc_plus($config['cc-username'], $config['cc-password'], $config['cc-host-uri']);

Where $config[''] vars are your cc plus api username/password and host

Creating a subscriber record

$cc_result = $cc->post_add_subscriber(json_encode($cust_id), "Business", "ACCOUNT NAME");

Updating a subscriber record

$cc_result = $cc->put_edit_subscriber($csrr);

Selecting a subscriber record

Using the customId


Using the _id field


Deleting a subscriber record


Creating a provisioning record


Updating a provisioning record


Selecting a provisioning record

Get provisioning record via device FSAN


Deleting a provisioning record


Selecting a device record

Get device from serial number


Sending TR-069 Messages

Set the parameters in an array. The following example sends a request to Consumer Connect to open the remote portal for a device. Most commands from the tr-098 document from the Broadband Forum work.

$tr_069_args = array(
	"cpeIdentifier"=> array(

Calix requires that a JSON string is sent to their system. The parameters above are required:

  • operations - (SetParameterValues, GetParameterValues, Reboot, FactoryReset, Download (untested but didn't fail!). Upload is currently not supported at the time of this documentation writing.
  • cpeIdentifier - I use serialNumber, but refer to the calix documentation for others like IP or MAC or something..
  • parameterValues - can set or use multiple elements within requests, unless Reboot or FactoryReset (which should be empty unless requesting some id callback thingy)

Then you can pass the array to the method.

$record = $cc->post_tr_069_request(json_encode($tr_069_args));

Example objects to help you get started

This class is designed to be fed php array's and std objects, and will perform a json encode before sending the request. This class is simply to get requests and responses in a good format. A typical response is:

    [error] =>
    [info] => Array

    [result] => Array
            [0] => stdClass Object
                    [_id] => dcd94b36-9ff5-83d8-ad18-639a8ad3297d
                    [name] => SANDYNET-TEST
                    [type] => Business
                    [customId] => 9999
                    [locations] => Array
                            [0] => stdClass Object
                                    [devices] => Array
                                            [0] => CXNK00FFFFFF
                                            [1] => CXNK00DDDDDD






Errors are returned in the error element and can be access via $cc->error. Depending on the request and calix documentation, different statuses will triggere different errors to be sent. A 404 when deleting a subscriber record will result in a custom error message. This isn't the most ideal option, but it does work better than having to check both the error and result elements for improper responses. Another example is that when a subscriber is created that already contains the same customId, the error message returned from compass will be parsed into the error element. My standard rule for checking the result is:

if($cc_result && empty($cc_result->error)){
} else {
  // Error

When creating or updating a record, an couple example arrays are provided.

Creating a Provisioning Record

$subscriber_id = $csrr->{'_id'};
$request = array(
    "wifi" => array(
      "1" => array(
       "BeaconType" => "WPAand11i",
       "WPAAuthenticationMode" => "PSKAuthentication",
       "WPAEncryptionModes" => "TKIPandAESEncryption",
       "IEEE11iAuthenticationMode" => "PSKAuthentication",
       "IEEE11iEncryptionModes" => "TKIPandAESEncryption",
       "BasicAuthenticationMode" => "None",
       "BasicEncryptionModes" => "None",
       "SSIDAdvertisementEnabled" => $broadcast_2ghz,
       "Enable" => true,
       "SSID" => $ssid_2ghz,
       "KeyPassphrase" => $password_2ghz,
       "RadioEnabled" => $radio_2ghz
      "9" => array(
       "RadioEnabled" => false


$cc_result = $cc->post_add_provisioning_record($request);


Check out the examples folder for the following

  • Creating a subscriber by giving only the required fields
  • Update the subscriber by pulling its record using the customId set by an OSS and then using it's cc+ id to update it's customer config
  • Pull a CPE's WLAN config from TR-069 in JSON
  • Push a CPE's WiFi configuration by creating a provisioning record