Hi Shamus

I am actually looking to build this functionality myself and ultimately its 
reliability is up to the script. 
I think the Asterisk API would probably be a better option for capturing errors.

Regards
Michael Knill




On 6 Dec 2014, at 1:21 am, Shamus Rask <sha...@srask.ca> wrote:

Lonnie, Michael:

Thank you for your replies. I had taken a look at the Perl script on void-info, 
however, as it states, it is not reliable. I am currently doing something 
similar from the CLI. The issue is that I have no guarantee of proper sync 
without writing a whole write-ack layer.

Lonnie–you are correct that the values are written directly to disc. The issue 
is that if you were to copy the modified db to another instance, Asterisk only 
“opens” the db on startup. Until it opens the modified db, it has no knowledge 
of any changes.

This seems to be a failing of Asterisk… was hoping someone else had banged 
their head against this one and had some ideas.

many thanks,
  Shamus

> Message: 2
> Date: Mon, 1 Dec 2014 21:12:19 -0600
> From: Lonnie Abelbeck <li...@lonnie.abelbeck.com>
> Subject: Re: [Astlinux-users] AstDB replication
> To: AstLinux Users Mailing List <astlinux-users@lists.sourceforge.net>
> Message-ID: <c519481f-3367-4bc5-821f-3b8b72cf4...@lonnie.abelbeck.com>
> Content-Type: text/plain; charset=windows-1252
> 
> Hi Shamus,
> 
> At least with Asterisk 11 which uses sqlite3, the writes seem to go directly 
> to disk, for example...
> 
> shell pbx # echo '.dump' | sqlite3 --batch /mnt/kd/astdb.sqlite3 | grep 
> '/foo/bar'
> (nothing)
> 
> asterisk pbx*CLI> database put foo bar 0
> 
> shell pbx # echo '.dump' | sqlite3 --batch /mnt/kd/astdb.sqlite3 | grep 
> '/foo/bar'
> INSERT INTO "astdb" VALUES('/foo/bar','0');
> 
> asterisk pbx*CLI> database del foo bar
> 
> shell pbx # echo '.dump' | sqlite3 --batch /mnt/kd/astdb.sqlite3 | grep 
> '/foo/bar'
> (nothing)
> 
> So, from this simple test the /mnt/kd/astdb.sqlite3 file seems to be kept 
> current in real time.  I suspect occasional rsync's should work though you 
> may want to make a temp copy of /mnt/kd/astdb.sqlite3 and rsync that just in 
> case the /mnt/kd/astdb.sqlite3 got written to while the rsync was still 
> active.
> 
> Lonnie
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Tue, 2 Dec 2014 04:30:04 +0000
> From: Michael Knill <michael.kn...@ipcsolutions.com.au>
> Subject: Re: [Astlinux-users] AstDB replication
> To: AstLinux Users Mailing List <astlinux-users@lists.sourceforge.net>
> Message-ID: <a9c0d1b8-a943-4bfb-b1c7-80691b8a1...@ipcsolutions.com.au>
> Content-Type: text/plain; charset="utf-8"
> 
> There is a Perl script here that you can modify to achieve this:
> 
> http://www.voip-info.org/wiki/view/Asterisk+database
> 
> Regards
> Michael Knill

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
pay...@krisk.org.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
pay...@krisk.org.

Reply via email to