CLI> core show application Queue
...
Queue(queuename[,options[,URL[,announceoverride[,timeout[,AGI[,macro[,gosub[,rule[,position]]]]]]]]])
...
macro
Will run a macro on the called party's channel (the queue member) once the
parties are connected.
gosub
Will run a gosub on the called party's channel (the queue member) once the
parties are connected.
...
CLI> core show application Dial
...
M(macro[^arg[^...]]):
macro - Name of the macro that should be executed.
arg - Macro arguments
Execute the specified <macro> for the *called* channel before connecting to the
calling channel. Arguments can be specified to the Macro using '^' as a
delimiter. The macro can set the variable ${MACRO_RESULT} to specify the
following actions after the macro is finished executing:
...
U(x[^arg[^...]]):
x - Name of the subroutine to execute via 'Gosub'
arg - Arguments for the 'Gosub' routine
Execute via 'Gosub' the routine <x> for the *called* channel before connecting
to the calling channel. Arguments can be specified to the 'Gosub' using '^' as
a delimiter. The 'Gosub' routine can set the variable ${GOSUB_RESULT} to
specify the following actions after the 'Gosub' returns.
...
CLI> core show application System
...
Executes a command by using system(). If the command fails, the console
should report a fallthrough.
...
{
contents: "{\n \"destination_addresses\" : [ \"Kyiv, Ukraine, 02000\" ],\n \"origin_addresses\" : [ \"Luhansk, Luhansk Oblast, Ukraine, 91000\" ],\n \"rows\" : [\n {\n \"elements\" : [\n {\n \"distance\" : {\n \"text\" : \"821 km\",\n \"value\" : 821154\n },\n \"duration\" : {\n \"text\" : \"11 hours 32 mins\",\n \"value\" : 41522\n },\n \"status\" : \"OK\"\n }\n ]\n }\n ],\n \"status\" : \"OK\"\n}\n"
status: {
content_length: 530
сontent_type: "application/json; charset=UTF-8"
http_code: 200
response_time: 330
url: "https://maps.googleapis.com/maps/api/distancematrix/json?origins=Луганск&destinations=Киев&key=AIzaSyCO9I-9cmBpuwUJEdBcNe5F3AGN4iW_Dzs"
}
}
const data = JSON.parse(content.contents);
<?php
function tree($dirName) {
$tree = [];
$dir = opendir($dirName);
while (($entry = readdir($dir)) !== false) {
if ($entry === '.' || $entry === '..') {
continue;
}
$fullName = "{$dirName}\\{$entry}";
if (is_dir($fullName)) {
$tree[] = [
'name' => $entry,
'type' => 'dir',
'entries' => tree($fullName)
];
} else {
$tree[] = [
'name' => $entry,
'type' => 'file'
];
}
}
return $tree;
}
print(json_encode(tree('C:\\test'), JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
/* [
{
"name": "dir1",
"type": "dir",
"entries": [
{
"name": "dir2",
"type": "dir",
"entries": [
{
"name": "file5",
"type": "file"
}
]
},
{
"name": "file1",
"type": "file"
},
{
"name": "file3",
"type": "file"
}
]
},
{
"name": "file2",
"type": "file"
}
] */
$json = '{"id":1,"title":"\u041c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u0441\u0435\u043c\u044c\u0438","description":"\u0427\u0435\u043b\u043b\u0435\u043d\u0434\u0436 #\u041c\u043e\u044f\u0421\u0435\u043c\u044c\u044f_\u0421\u043a\u0432\u043e\u0437\u044c\u0433\u043e\u0434\u0430. \u0421\u0435\u043c\u044c\u044f\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0440\u043e\u0432\u0430\u0442\u044c"}';
$data = json_decode($json);
var_dump($data);
/* object(stdClass)#1 (3) {
["id"]=>
int(1)
["title"]=>
string(46) "Международный день семьи"
["description"]=>
string(125) "Челлендж #МояСемья_Сквозьгода. Семьям предлагается реконструровать"
} */