[asterisk-users] How to write data to astdb?

Vincent Delporte vincent.delporte at bigfoot.com
Mon May 14 22:36:44 MST 2007


Hello,

	I'm trying to fill CID data into the astdb using AsteriskWin32's 
asterisk.exe, to no avail: The batch file stops after the first line, and 
just waits:

----------------------------------------
rem c:\cygroot\mystuff>import.bat
rem
rem c:\cygroot\mystuff>C:\cygroot\bin\asterisk.exe -rx 'database put 
cidname 123 "My cellphone"'
rem
rem Asterisk module loaded successfully
rem Asterisk entry point foundW2003*CLI> Updated database successfully
rem Verbosity is at least 1
rem STUCK HERE!

C:\cygroot\bin\asterisk.exe -rx 'database put cidname 123 "My cellphone"'
C:\cygroot\bin\asterisk.exe -rx 'database put cidname 456 "This is a test"'
----------------------------------------

I don't know why the batch script stops after the first line.

So, I installed ActivePerl and the asterisk-perl package from CPAN, and 
tried this, but it doesn't work either:

----------------------------------------
use Asterisk::AGI;

$AGI = new Asterisk::AGI;
$AGI->database_put('cidname', '5555', 'my number');
----------------------------------------

Is there a way to access astdb directly, instead of through an AGI script?

Thank you.



More information about the asterisk-users mailing list