Implement .env configuration
This commit is contained in:
+5
-1
@@ -3,10 +3,14 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once __DIR__ . '/../src/VoipMsClient.php';
|
||||
require_once __DIR__ . '/../src/EnvLoader.php';
|
||||
|
||||
use VoipMs\EnvLoader;
|
||||
use VoipMs\VoipMsClient;
|
||||
use VoipMs\VoipMsResponse;
|
||||
|
||||
EnvLoader::load(__DIR__ . '/../.env');
|
||||
|
||||
const MCP_PROTOCOL_VERSION = '2025-06-18';
|
||||
const MCP_SESSION_ID = 'voipms-test-session';
|
||||
|
||||
@@ -229,7 +233,7 @@ function callTool(string $name, array $arguments): array
|
||||
'voipms_get_recent_cdr' => responsePayload($client->getCdr(
|
||||
requiredStringArg($arguments, 'date_from'),
|
||||
requiredStringArg($arguments, 'date_to'),
|
||||
stringArg($arguments, 'timezone', getenv('VOIPMS_TIMEZONE') ?: '-4'),
|
||||
stringArg($arguments, 'timezone', getenv('VOIPMS_TIMEZONE') ?: getenv('DEFAULT_TIMEZONE') ?: '-4'),
|
||||
cdrFilters($arguments),
|
||||
)),
|
||||
'voipms_add_number_to_phonebook_group' => addNumberToPhonebookGroupTool($client, $arguments),
|
||||
|
||||
Reference in New Issue
Block a user