コード例 #1
0
 public function addDevice($device)
 {
     $request = OCISchemaUser::UserModifyRequest17sp4($this->userId);
     $request[OCIDataTypes::OCI_PARAMS]['endpoint']['accessDeviceEndpoint'] = $this->getConfig()->UserGetResponse17sp4->accessDeviceEndpoint;
     $request[OCIDataTypes::OCI_PARAMS]['endpoint']['accessDeviceEndpoint']['accessDevice']['deviceName'] = $device->getDevice()->macAddress;
     unset($request[OCIDataTypes::OCI_PARAMS]['endpoint']['accessDeviceEndpoint']['staticRegistrationCapable']);
     unset($request[OCIDataTypes::OCI_PARAMS]['endpoint']['accessDeviceEndpoint']['useDomain']);
     $this->migrator->send($request);
     return $this->migrator->getResponse();
 }
コード例 #2
0
 private function addDeviceToUser($deviceName, $userId, $phoneNumber, $extension = null, $linePort)
 {
     $deviceName = OCIBuilder::buildSearch([OCIDataTypes::OCI_PARAMS => ['deviceLevel' => 'Group', 'deviceName' => $deviceName]]);
     $accessDevice = OCIBuilder::buildSearch([OCIDataTypes::OCI_PARAMS => ['accessDevice' => $deviceName, 'linePort' => $linePort]]);
     $accessDeviceEnpoint = OCIBuilder::buildSearch([OCIDataTypes::OCI_PARAMS => ['accessDeviceEndpoint' => $accessDevice]]);
     $extension = !empty($extension) ? $extension : OCIDataTypes::XSI_NIL;
     $request = OCISchemaUser::UserModifyRequest17sp4($userId, null, null, null, null, null, null, $phoneNumber, $extension, null, null, null, null, null, null, null, $accessDeviceEnpoint);
     return ['schema' => 'OCISchemaUser', 'command' => $request];
 }