[asterisk-users] AGI command

Steve Edwards asterisk.org at sedwards.com
Wed Jan 16 11:03:18 CST 2013


On Wed, 16 Jan 2013, Muhammad wrote:

> **When you say 'doesn't work' do you mean 'doesn't do what I want' or 
> 'does not execute?'
> 
> I mean I do all steps in Mr. Nir presentation documents and not works.

Your PHP script executes correctly on my dev box, but I would change the 
log file path to something absolute like '/tmp/agi_log.log' so we know 
where it is.

1) What does the Asterisk console log look like when you try to execute 
the AGI?

2) If you enter '/usr/bin/php -v', what do you get? I get:

PHP 5.1.6 (cli) (built: Feb 22 2012 19:34:21)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

3) If you enter the following command in a shell, what do you get?

 	sudo -u asterisk /var/lib/asterisk/agi-bin/testAGI.php </dev/null

(If you run Asterisk as another user, use that user name in the command 
above.)

I get:

PHP Notice:  Undefined offset:  1 in /var/lib/asterisk/agi-bin/testAGI.php 
on line 31
STREAM FILE demo-congrats #
SAY NUMBER 123456 #

The 'notice' is because we passed an empty AGI environment.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list