Hi all, i would likte to do an "asterisk -rx show channels" regulary from cron and save the results. Easy it may seem, but when running the command from cron "sip*CLI> " is the only result. Even expect seems to have problems with getting results from asterisk. Is it possible to solve the above problem? /Chris
On Wed, 2003-06-18 at 17:01, Christopher Arnold wrote:> Hi all, > > i would likte to do an "asterisk -rx show channels" regulary from cron and > save the results. Easy it may seem, but when running the command from cron > "sip*CLI> " is the only result. > > Even expect seems to have problems with getting results from asterisk. > > Is it possible to solve the above problem?I'm testing my guess right now, but I am guessing you need to quote the show channels command. So from /etc/crontab you would have an entry like... 0,10,20,30,40,50 * * * * root asterisk -rx "show channels" -- Steven Critchfield <critch@basesys.com>
>Hi all, > >i would likte to do an "asterisk -rx show channels" regulary from cron and >save the results. Easy it may seem, but when running the command from cron >"sip*CLI> " is the only result. > >Even expect seems to have problems with getting results from asterisk. > >Is it possible to solve the above problem? > > /ChrisTry: asterisk -r -x "show channels" JT
Why not write a [insert favorite scripting language here] script to use the Asterisk manager interface? I've wrote quite a few little perl scripts each doing their own specific function. Works quite well. Jeremy Christopher Arnold wrote:>Hi all, > >i would likte to do an "asterisk -rx show channels" regulary from cron and >save the results. Easy it may seem, but when running the command from cron >"sip*CLI> " is the only result. > >Even expect seems to have problems with getting results from asterisk. > >Is it possible to solve the above problem? > > /Chris >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users > >