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.




> Date: Sat, 24 Jan 2009 23:23:40 +0200
> From: [email protected]
> To: [email protected]
> Subject: Re: [asterisk-users] Reading/Writing the Astdb
> 
> On Sat, Jan 24, 2009 at 11:00:58AM -0500, [email protected] 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 .
> 
> -- 
>                Tzafrir Cohen
> icq#16849755              jabber:[email protected]
> +972-50-7952406           mailto:[email protected]
> http://www.xorcom.com  iax:[email protected]/tzafrir
> 
> _______________________________________________
> -- 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

_________________________________________________________________
Windows Liveā„¢: E-mail. Chat. Share. Get more ways to connect. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_allup_howitworks_012009
_______________________________________________
-- 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