Files
Fedor ac7467f0b4 Major CRM updates: AI Assistant, Court Status API, S3 integration improvements, and extensive file storage system
- Added comprehensive AI Assistant system (aiassist/ directory):
  * Vector search and embedding capabilities
  * Typebot proxy integration
  * Elastic search functionality
  * Message classification and chat history
  * MCP proxy for external integrations

- Implemented Court Status API (GetCourtStatus.php):
  * Real-time court document status checking
  * Integration with external court systems
  * Comprehensive error handling and logging

- Enhanced S3 integration:
  * Improved file backup system with metadata
  * Batch processing capabilities
  * Enhanced error logging and recovery
  * Copy operations with URL fixing

- Added Telegram contact creation API
- Improved error logging across all modules
- Enhanced callback system for AI responses
- Extensive backup file storage with timestamps
- Updated documentation and README files

- File storage improvements:
  * Thousands of backup files with proper metadata
  * Fix operations for broken file references
  * Project-specific backup and recovery systems
  * Comprehensive file integrity checking

Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
2025-10-16 11:17:21 +03:00

70 lines
1.8 KiB
PHP

<?php
namespace SPVoipIntegration\api;
class UIScomClient {
const EMPLOYEE = 'employee/';
private $_url;
private $_key;
private $_secret;
private $_httpCode;
private $_limits = array();
/**
* @param $key
* @param $secret
*/
public function __construct($key, $secret) {
$this->_url = \Settings_SPVoipIntegration_Record_Model::getUIScomApiUrl();
$this->_key = $key;
$this->_secret = $secret;
}
/**
*
* @param type $UIScomRequest
* @return type
* @throws Exception
*/
public function call($UIScomRequest) {
if (!is_array($UIScomRequest)) {
throw new Exception('Null request.');
}
$requestType = 'POST';
$data = json_encode($UIScomRequest);
$options = array(
CURLOPT_URL => $this->_url,
CURLOPT_CUSTOMREQUEST => $requestType,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
// CURLOPT_HEADERFUNCTION => array($this, '_parseHeaders')
);
$ch = curl_init();
$options[CURLOPT_POST] = true;
$options[CURLOPT_POSTFIELDS] = $data;
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
$error = curl_error($ch);
$this->_httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($error) {
throw new Exception($error);
}
return $response; // return call_session_id
}
/**
* @return int
*/
public function getHttpCode() {
return $this->_httpCode;
}
/**
* @return array
*/
public function getLimits() {
return $this->_limits;
}
}