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

C F shmaltz at gmail.com
Tue May 15 17:47:50 MST 2007


I use asterisk -rx "database put value" if you are trying to batch it
from windows you can use plink

On 5/15/07, Vincent Delporte <vincent.delporte at bigfoot.com> wrote:
> 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.
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>


More information about the asterisk-users mailing list