PAGI icon indicating copy to clipboard operation
PAGI copied to clipboard

Wrong arguments numbering [BUG]

Open frenzymind opened this issue 5 years ago • 0 comments

Hello. I run script like this: AGI(agi-scripts/createCall/run.php,HI,THERE,WITH,ARGUMENTS)

In exmaples I found this way to get arguments:

$variables = $pagiClient->getChannelVariables();

for ($i = 0; $i < $variables->getTotalArguments(); $i++) {
    $pagiClient->getAsteriskLogger()->notice(' -- Argument ' . intval($i) . ': ' . $variables->getArgument($i));
}

but in this case argument with index 0 is always empty and last argument is always absent.

TEMPORARY FIX:

I have to start from "index = 1 to <= total" counts in for loop.

frenzymind avatar Aug 06 '20 06:08 frenzymind