At 8:48 PM on 26 Jan 2009, cbbs...@hotmail.com wrote:

> 
> Tzafrir;
>    That's a really good idea, however, I am having problems getting
> it to work. I tried the following:
> 
> echo -n "asterisk -rx \"database put FOO BAR 1\" " | socat
> - /var/run/asterisk/asterisk.ctl
> 
> and
> 
> echo -n "asterisk -rx \"database put FOO BAR 1\" " | socat -
> UNIX-CONNECT: /var/run/asterisk/asterisk.ctl
> 
> both look like there was a connection to asterisk on the CLI, but no
> update. What am I missing? BTW; the difference between connecting to
> asterisk by doing a asterisk -rx "<cmd>" and doing it this way was >
> 500ms the first way and 7ms the second. Awesome.

Just guessing, but try it without the "asterisk -rx":

echo -n "database put FOO BAR 1" | socat -
UNIX-CONNECT:/var/run/asterisk/asterisk.ctl 

And if that doesn't work, maybe omit the "-n" so that it sends a
newline.


> > Date: Sat, 24 Jan 2009 23:23:40 +0200
> > From: tzafrir.co...@xorcom.com
> > To: asterisk-users@lists.digium.com
> > Subject: Re: [asterisk-users] Reading/Writing the Astdb
> > 
> > On Sat, Jan 24, 2009 at 11:00:58AM -0500, cbbs...@hotmail.com wrote:
> > > 
> > > All;
> > >    I have a question regarding the Astdb. When reading more than
> > > a few values, it can take quite a while to grab several
> > > values in the astdb using say, asterisk -rx "database show" >
> > > output.txt and work with that and then set a new value such as
> > > asterisk -rx "database put $key $value". The whole process can
> > > take over 1 second for EACH ENTRY which adds up for more than a
> > > few keys.
> > 
> > Either do that through the manager interface, or (if you want to
> > batch commands) send them directly over the unix-domain socket
> > asterisk.ctl .



-- 

C. Chad Wallace, B.Sc.
The Lodging Company
http://www.skihills.com/
OpenPGP Public Key ID: 0x262208A0

Attachment: signature.asc
Description: PGP signature

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to