Asterisk Manager API Action DBGet

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>

Example in Perl (verified in asterisk 1.4.22)
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



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>

Example in Perl (verified in asterisk 1.4.22)
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



Created by: mmetzger, Last modification: Fri 24 of Oct, 2008 (07:31 UTC) by gkservice
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+