[asterisk-users] Locking phones at night...

Marco Mouta marco.mouta at gmail.com
Wed Oct 18 15:55:20 MST 2006


A simple way would be:

IVR menu that locks the phone, using function DB(family/key), try show
function DB
in your dialplan.

With DB(family/key) you may insert data into AstDB ; you lock the phone

you may define family= LockedPhones , and the key is the callerid
number of the phone

With DB_EXISTS(family/key) you check if there is an entry to the
current phone inside AstDB, if exists the phone is locked no calls
available else dial!

With  DBdel(family/key) you may unlock the phone from dialplan.

with asterisk -rx database get and put you can manipulate astDB from
your web application.

Hope this helps











On 10/18/06, Mojo with Horan & Company, LLC <mojo at horanappraisals.com> wrote:
>
> Tzafrir Cohen wrote:
> > Is there a simple and safe way to query the astdb database outside of
> > Asterisk?
> after writing to it with:
> asterisk -rx 'database put phones locked 1'
> something like
> asterisk -rx 'database get phones locked'
> returns 1...
>
> Is this what you mean by outside of asterisk?  Sorry if I misunderstood.
>    I'm under the impression (possibly erroneously) that asterisk doesn't
> flush its database to disk often enough for you to trust copies that
> might be stored there, or to notice new changes made on-disk by you.
> That being said, Berkeley DB file, /var/lib/asterisk/astdb.
>
> Moj
>
>
> --
> Mojo <mojo at horanappraisals.com>
> Office Manager, Horan & Company, LLC
> (907) 747-6666 x112
> _______________________________________________
> --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
>


-- 
Com os melhores cumprimentos,

Marco Mouta


More information about the asterisk-users mailing list