Perl DB_File and Asterisk

Joined: Tue 26 of Aug, 2008

Perl DB_File and Asterisk

Posted:Tue 26 of Aug, 2008 (07:19 UTC)

I would like to use a perl script to manage my AstDB using DB_File module. If I write a family/key-value in my database from perl, reading it from asterisk CLI shows one missing digit in key and one missing digit in value, but reading in from perl shows all the digits.

For example:

my perl:

tie %h, "DB_File", "/var/lib/asterisk/astdb", O_RDWR, 0640, $DB_BTREE or die "cannot open DB";
%h{'personalgreeting/46109'} = 'yes';

Asterisk CLI:

aks1-dev*CLI> database show

personalgreeting/4610 : ye


foreach $key (keys(%h)){
print "$key -> $h{$key}\n";

script output: personalgreeting/46109 -> yes

Any idea?
Thanks for your help