Hello everyone,
I am sure that someone can help with this. We decided to do a fresh install
of asterisk 1.6.2.19
And after we did that, the problem that we have is this - We cant run a
single Php file!
Here's the output:
-- Executing [8212@from-pstn:1] Answer(DAHDI/23-1, ) in new stack
-- Executing [8212@from-pstn:2] AGI(DAHDI/23-1, testera.agi) in new
stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/testera.agi
DAHDI/23-1AGI Tx agi_request: testera.agi
DAHDI/23-1AGI Tx agi_channel: DAHDI/23-1
DAHDI/23-1AGI Tx agi_language: en
DAHDI/23-1AGI Tx agi_type: DAHDI
DAHDI/23-1AGI Tx agi_uniqueid: 1310825293.10
DAHDI/23-1AGI Tx agi_version: 1.6.2.19
DAHDI/23-1AGI Tx agi_callerid: 112686649
DAHDI/23-1AGI Tx agi_calleridname: unknown
DAHDI/23-1AGI Tx agi_callingpres: 3
DAHDI/23-1AGI Tx agi_callingani2: 0
DAHDI/23-1AGI Tx agi_callington: 33
DAHDI/23-1AGI Tx agi_callingtns: 0
DAHDI/23-1AGI Tx agi_dnid: 8212
DAHDI/23-1AGI Tx agi_rdnis: unknown
DAHDI/23-1AGI Tx agi_context: from-pstn
DAHDI/23-1AGI Tx agi_extension: 8212
DAHDI/23-1AGI Tx agi_priority: 2
DAHDI/23-1AGI Tx agi_enhanced: 0.0
DAHDI/23-1AGI Tx agi_accountcode:
DAHDI/23-1AGI Tx agi_threadid: -1223132272
DAHDI/23-1AGI Tx
DAHDI/23-1AGI Rx verbose Failed to execute
'/var/lib/asterisk/agi-bin/testera.agi': No such file or directory 1
testera.agi: Failed to execute '/var/lib/asterisk/agi-bin/testera.agi': No
such file or directory
DAHDI/23-1AGI Tx 200 result=1
VERIFIED EVERYTHING:
[root@localhost agi-bin]# ls -l
total 48
-rwxr-xr-x 1 asterisk asterisk 1742 Jul 1 18:57 agi-test.agi
-rwxr-xr-x 1 asterisk asterisk 9909 Jul 1 18:57 eagi-sphinx-test
-rwxr-xr-x 1 asterisk asterisk 8724 Jul 1 18:57 eagi-test
-rwxr-xr-x 1 asterisk asterisk 14530 Jul 1 18:57 jukebox.agi
-rwxr-xr-x 1 asterisk asterisk 1508 Jul 16 16:04 testera.agi
[root@localhost agi-bin]# which php
/usr/bin/php
Here's the agi - simple test that we picked from the net.:
#!/usr/bin/php
?
ob_implicit_flush(false);
set_time_limit(6);
$stdin = fopen('php://stdin', 'r');
$stdlog = fopen('my_agi.log', 'w');
$debug = true;
/* Read input from Asterisk and output via $astOutput */
function astRead()
{
global $stdin, $debug, $stdlog;
$astOutput = str_replace(\n, , fgets($stdin, 4096));
if ($debug) fputs($stdlog, read: $input\n);
return $astOutput ;
}
/* Write AGI command to Asterisk */
function astWrite($agiCommand)
{
global $debug, $stdlog;
if ($debug) fputs($stdlog, write: $agiCommand\n);
echo $agiCommand.\n;
}
/* Handling execution input from Asterisk */
$agivar = array();
while (!feof($stdin))
{
$temp = fgets($stdin);
$temp = str_replace(\n,,$temp);
$s = explode(:,$temp);
$agivar[$s[0]] = trim($s[1]);
if ($temp == )
{
break;
}
}
/* Operational Code starts here */
/* Playback the demo-congrats.gsm file from the
* directory /var/lib/asterisk/sounds/
*/
astWrite(STREAM FILE /var/lib/asterisk/sounds/en/tt-monkeys #);
astRead();
/* Say the number 123456
astWrite(SAY NUMBER 123456 #);
astRead();*/
/* Finalization of AGI script and clean-ups */
fclose ($stdin);
fclose ($stdlog);
exit(0);
?
All help is appreciated.
Thanks,
Z. Zivanovic
--
_
-- 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