Subject: | Does not support Asterisk 1.6 Variable format |
Asterisk 1.6 requires that if you need to specify several variables to a
request, you need to repeat the definition.
For example:
*1.2 Syntax:
Variable: ONE=1|TWO=2
*1.6 Syntax:
Variable: ONE=1
Variable: TWO=2
The "patch" below, makes this possible by doing as in this example:
$astman->send_command(
Action => 'Originate',
Channel => 'SIP/101',
Variable => [
'ONE=1',
'TWO=2'
]
);
To fix this, go to line ~236, and change the following:
From:
foreach my $key (keys %thash) {
$tstring .= $key . ': ' . $thash{$key} . $EOL;
}
To:
foreach my $key (keys %thash) {
if (ref $thash{$key} eq 'ARRAY') {
foreach my $value (@{$thash{$key}}) {
$tstring .= $key . ': ' . $value . $EOL;
}
} else {
$tstring .= $key . ': ' . $thash{$key} . $EOL;
}
}