[asterisk-users] AGI doesn't execute PHP5 script

Stefan-Michael. Guenther (in-put GbR) asterisk at in-put.de
Tue Aug 8 23:45:19 MST 2006


Hi,

Am Mittwoch, 9. August 2006 08:09 schrieb Matt Riddell (NZ):
> >>> The problem is, as you can see from the output in the CLI, that
> >>> Asterisk claims that it executes the script, but nothing happens. It
> >>> doesn't create the file /tmp/asterisk and it doesn't send an email.
> >>> When I execute the script manually on the command line, it is executes
> >>> without an error, the file is there and the email, too.
> >
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> >> Try running it from the command line and see what happens
> >
> > I guess you meant the test.php script, right?
> > Executing php5 scripts on the command line isn't a problem at all, only
> > when they are started through AGI.
>
> This particular script also?
>
> Are you using AGI DEBUG in console?
>
yes, I can execute test.php on the command line and it runs as expected.
Wenn I call it via AGI nothing happens.

Yes, the first mail contained the output of the script with "agi debug", "set 
verbose 10", "set debug 10" set before. Here it is again:

asterisk*CLI> dial 111 at guenther
    -- Executing Answer("OSS/dsp", "") in new stack
 << Console call has been answered >>
    -- Executing AGI("OSS/dsp", "test.php") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/test.php
AGI Tx >> agi_request: test.php
AGI Tx >> agi_channel: OSS/dsp
AGI Tx >> agi_language: en
AGI Tx >> agi_type: Console
AGI Tx >> agi_uniqueid: asterisk-6958-1155024459.47
AGI Tx >> agi_callerid: unknown
AGI Tx >> agi_calleridname: unknown
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: unknown
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: guenther
AGI Tx >> agi_extension: 111
AGI Tx >> agi_priority: 2
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >> LI>
    -- AGI Script test.php completed, returning 0
    -- Executing Hangup("OSS/dsp", "") in new stack
 << Hangup on console >>

And it doesn't make a difference whether I use the dial command or a sip phone 
to call extension 111 in context [guenther]. Strange, isn't it?

Stefan
-- 

********************************************
in-put GbR - Das Linux-Systemhaus
Stefan-Michael Guenther
Moltkestrasse 49     D-76133 Karlsruhe
Tel./Fax : +49 (0)721 / 83044 - 98/93
http://www.in-put.de
********************************************
     Schulungen  Installationen  
         Beratung   Support
      Voice over IP - Lösungen
********************************************



More information about the asterisk-users mailing list