[SOLVED] Asterisk PHP AGI run with Crontab


I use Asterisk 1.8 and I’ve created agi scritp with PHP.
I’ve defined the correct exten in extensions.conf and I’m able to execute AGI script from the dialplan.

For example:

So, in this scenario, AGI script is executed every time I call 999.

I want to execute this AGI script in a scheduled way (every day at 2pm).
Can I use crontab? How can I do?

Thanks a lot for your support.


Use call files

I few months a go a did something similar, this was my code:

root@Asterisk:~# crontab -e

*/5 * * * * /usr/sbin/asterisk -rx “originate SIP/101 extension 4444@marketing”


I know how it works call file, but it’s not my purpose.
I want to schedule PHP AGI script or execute AGI Script from linux shell.

Have you got an idea?

root@Asterisk:~# crontab -e

*/5 * * * * /usr/sbin/asterisk -rx “originate SIP/101 extension 4444@marketing”[/quote]

I’ve solved.

it was enough to use this command from linux shell: