Hi everyone. I’m trying to read/write an astdb file with a perl script.
Asterisk doesn’t see the records I add. They’re visible via my script, but not with the Asterisk.
I’ve noted, that then you add a database record using Asterisk, it adds family/value/key ending with the 0x00 symbol. That looks like a clue, but it’s not…
Does anyone have a working solution? What am I missing?
CLI: is it possible to access the command line without access to a file /var/run/asterisk.ctl ? /the path may deffer/
Manager: Is it known to be secure enough to be www-accessible ? maybe thats the way =/
But, for me it seems rather strange. Since other scripts feel good, accessing this NFS-share (for CDR, for wav-files, MOH), there should be an easy way to read/write this BerkeyDB file…
Thanks again!
HussainAkbar: Thank you! You’re right, my “7 girls” are continuation of your virgins
Accessing the manager from a remote machine is/can be very secure. you limit access to manager via allow and deny to only 127.0.0.1 then use as client server style of script to make the changes, You never access directly.
The problem is: Asterisk reads the DB data into memory pools, syncing the pools and the real database is made in one-way-direction (write from memory to disk)… So Asterisk will never know, if something is changed on the disk, unless you restart Asterisk to see the changes =)
Even this cant be an idea, since Asterisk may call sync() at any time to write changes from memory to disk and erase all your changes…
Stupid question now nobody ever program those kind of scripts? Thats not intresting?
What we do on ours and customer systems is
For example
on a remote webserver data is entered. when submited it is sent as a https post to a php script on asterisk, This script then makes a manager connection to Asterisk and then makes the relevent changes to the DB.
Various security measures are in place to stop other people sending requests to the asterisk php script. This makes for a secure system with no direct access to manager at all
As I’ve understood, you have http-server and php installed on your Asterisk servers?
Just to say, I dont like php at all =) Sorry… Its huge and buggy I have a SingleBoardComputer at home, it has 32Mb of ssd and 32Mb of RAM and it’s happily running FreeBSD7.0 with Asterisk. There’s no place for 5 (?) Mb of libPHP
Oh! While I was typing, I’ve got an idea to mount (sshfs) remote Asterisk system to use it’s asterisk.ctl… like that I’d be able to use CLI, right?