[Asterisk-Users] ast_sock_cmd: pipe commands to asterisk
    Tzafrir Cohen 
    tzafrir at cohens.org.il
       
    Fri Dec 23 05:02:43 MST 2005
    
    
  
On Fri, Dec 23, 2005 at 01:31:18PM +0800, Dinesh Nair wrote:
> 
> 
> On 12/23/05 03:01 Tzafrir Cohen said the following:
> >example usage:
> >
> >  echo -e "set verbose 3\nset debug 5" | ./ast_sock_cmd
> >  
> >  echo -e "restart now" | ./ast_sock_cmd
> >
> >I'd also be happy to know of existing alternatives. It looked strange I
> >could not find such an existing tool to pipe text into a unix-domain
> >socket.
> 
> how different is this from using the following,
> 
> asterisk -rx 'set verbose 3'
> asterisk -rx 'restart now'
Because you have to invoke asterisk twice. You can't pipe standard input
into 'asterisk -r' .
And because you have to invoke asterisk just for writing to a socket. 
(The asterisk daemon will do its own sanity cheks later, no need to do
them in the client).
-- 
Tzafrir Cohen         | tzafrir at jbr.cohens.org.il | VIM is
http://tzafrir.org.il |                           | a Mutt's  
tzafrir at cohens.org.il |                           |  best
ICQ# 16849755         |                           | friend
    
    
More information about the asterisk-users
mailing list