PHP Agi in not working in cron


#1

Hi
I am using php 7.2 and I have an agi which I want to execute through cron not from dial plan. It is not working from cron. On investigation found that I have to press enter at every time when I add phpagi class file.
When I run without class files it working perfect.


#2

AGIs are meant to be executed by Asterisk, and have certain expectations. If you don’t need it to be an AGI, then just make it a normal script.


#3

Thanks for feed back. Is it possible to run asterisk dial-plan from cron in which we would give desired Agi?


#4

I don’t understand your question. You would need to originate a call through Asterisk to then execute dialplan. You may want to explain exactly what you are attempting to achieve instead of the low level details like this.


#5

This could be path issue , when running from cron some script paths are not found


#6

My purpose is to run a originate script , for auto dialer, get leads from hopper and dial numbers.


#7

Use AMI, not AGI. AGI is for first party control.