Page 1 of 1

crontab and asterisk

PostPosted: Wed Mar 23, 2011 1:14 pm
by zxcoolman
VICIDIAL How does it update the configuration files for asterisk?
I know that when you add a phone for example, the script uses php INSERT to put them in the database but how the Asterisk configuration files are they updated?
I see nothing in the crontab.
I use GoAutodial 2.0.

So I'm French crowns me not to speak English well (google-translation ) :oops:

PostPosted: Wed Mar 23, 2011 3:53 pm
by mflorell
ADMIN_keepalive_ALL.pl writes the conf files and reloads the appropriate modules in Asterisk

PostPosted: Wed Mar 23, 2011 5:36 pm
by zxcoolman
mflorell wrote:ADMIN_keepalive_ALL.pl writes the conf files and reloads the appropriate modules in Asterisk


Thank you for your reply. :)
But how the script runs ADMIN_keepalive_ALL.pl?
Because it is unnecessary to crontab to run the script.
Or how to configure VICIDIAL put his scripts updated every 15 seconds for example?

PostPosted: Wed Mar 23, 2011 9:51 pm
by williamconley
crontab creates a "timer" in the system that runs each minute (on the minute at :00) and runs the keepalive.

if you want to run it on another schedule ... you'll have to create a new script that will run on a different schedule (and perhaps take 45 seconds to run giving access to the :15 :30 :45 moments to execute).

but: WHY do you want to modify anything every 15 seconds, and what do you want to modify? most items can be done within the mysql database ...

PostPosted: Wed Mar 23, 2011 11:16 pm
by zxcoolman
thank you for your reply. :D
I want to change the script's execution time relative to a given school project.
Are what I can find a web page with all the perl scripts detailed?

PostPosted: Wed Mar 23, 2011 11:35 pm
by williamconley
1) "relative to a" is not a time. or explanation as to why every 15 seconds. it runs every minute now, are you saying you have a school project that runs every 15 seconds? or that you need to know how to change the time because changing the time is part of the project?

2) there is NO web page with details of anything. documentation is in the /docs/ folder of the /usr/src/astguiclient/VERSION that you are using.

the scripts themselves are in /usr/share/astguiclient and have notes in them as well. also, most can be executed with "perl /usr/share/astguiclient/FILENAME --help" to get basic usage instructions

Welcome to Linux, Good luck on the project 8)

PostPosted: Thu Mar 24, 2011 10:25 am
by zxcoolman
Thank you for all information. I need to change the time to reload config files just for my personal culture ^ ^ ... and to understand the crontab.
What are the most important perl scripts?

PostPosted: Tue Mar 29, 2011 2:13 pm
by callcrazy
I wouldn't recommend doing this, but if 15 second intervals is required you could try:

crontab -e

Then modify the line that runs ADMIN_keepalive_ALL.pl

* * * * * /usr/share/astguiclient/ADMIN_keepalive_ALL.pl; sleep 15; /usr/share/astguiclient/ADMIN_keepalive_ALL.pl; sleep 15; /usr/share/astguiclient/ADMIN_keepalive_ALL.pl

This will run the script every minute, wait 15 seconds after the script returns, run the script again, wait 15 seconds after script returns, run it again. Then at the top of the next minute the process will start again.

Of course this may slow you down, break things, or cause unexpected bahavior with vicidial and goautodial, but that will give you more granular control over the script from cron without doing much else.

I'd say though that it may be best to understand why it's setup every minute and not 15 seconds already and to just expect that instead of speeding the system up. You are making a lot of configurations today, but when running in production you will not be making as many changes that would require 15 seconds over 60.

PostPosted: Tue Mar 29, 2011 8:28 pm
by williamconley
have you installed Vicidial (with the GoAutoDial installer cd)?

if so: have you entered "crontab -e" on your command line?

after that if you want to "play with crontab", that would not be related to vicidial. there are lots of places to get help with crontab in your own language that would be much better.

PostPosted: Sat Apr 02, 2011 10:03 am
by zxcoolman
thank you for your answer callcrazy, I'll let the initial configuration:)

williamconley: yes I installed the CD goautodial.

If you could help me I have some questions about VICIDIAL
http://www.vicidial.org/VICIDIALforum/viewtopic.php?t=17422

thank you very much for your help;)