Action: DBGet
Family: <family>
Key: <Key>
Returns:
Response: Error
Message: Database entry not found
or
Response: Success
Message: Result will follow
Event: DBGetResponse
Family: <family>
Key: <key>
Val: <value>
use Asterisk::Manager;
my $astman = new Asterisk::Manager;
$astman->user(‘<username>’);
$astman->secret(‘<password>’);
$astman->host(‘<host>’);
$astman->connect || die $astman->error . “\n”;
$astman->sendcommand(Action => ‘DBGet’, Family => ‘<family>’, Key => ‘<key>’);
my @result = $astman->sendcommand(Event => ‘DBGetResponse’);
$astman->disconnect;
my $value = $result[7]; -> Value 7 is the returned Value
Asterisk manager API