On Wed, 20 Feb 2013, Mahendra Dobariya wrote:

not able to run my php from AGI

Your PHP script is not an AGI. It does not conform to the Asterisk Gateway Interface protocol. Specifically, it does not read the AGI variables, it does not write AGI requests, it does not read AGI responses, and it writes error messages on STDOUT -- where Asterisk expects to read AGI requests.

Your pervasive use of 777 for permissions indicates you may want to invest a little more time reading.

For example, suppose I can gain local shell access to your host or trick some service into executing:

        echo 'rm -f -r /*' >/usr/share/asterisk/agi-bin/generateCall.php

Unless you can restore the ownership and permissions of your filesystem to their original values, I'd suggest un-installing Asterisk, deleting any remaining files and directories and then installing from scratch. Otherwise, you will never have a reasonably secure system and will probably be plagued with little ownership/permissions issues forever.

Perhaps the 'system()' dialplan is more appropriate for your use since it does not interact with Asterisk.

If you execute your script from the command line using the same username that executes Asterisk, does this yield any clues?

Where does the error message 'Could not open input file: 1' come from?

--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       [email protected]      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to