login | register
Tue 02 of Dec, 2008 [03:41 UTC]

voip-info.org

History

Asterisk Manager API Action DBGet

Created by: mmetzger,Last modification on Fri 24 of Oct, 2008 [07:31 UTC] by gkservice
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




Comments