2015-06-27 32 views
-1

我使用AGI(Asterisk的網關接口),用於運行PHP腳本從撥號計劃未能AGI星號來執行PHP腳本,沒有這樣的文件或目錄

我的撥號方案看起來像

exten =>2600,1,Playback(hello-world) 

same =>n,AGI(agiscript.php) 

same =>n,Hangup() 

agiscript .PHP是看起來像AGI組調試

`#!/usr/bin/php -q 
<?php 
require_once('dbconnect.php'); 
db_connect(); 
$sql = "update oicall_main set balance='100' where username='100';"; 
$result = mysql_query($sql); 
?>` 

CLI輸出上是

` -- <SIP/example-00000001> Playing 'hello-world.gsm' (language 'en') 
    -- Executing [[email protected]:2] AGI("SIP/example-00000001", "agiscript.php") in new stack 
    -- Launched AGI Script /var/lib/asterisk/agi-bin/agiscript.php 
<SIP/example-00000001>AGI Tx >> agi_request: agiscript.php 
<SIP/example-00000001>AGI Tx >> agi_channel: SIP/example-00000001 
<SIP/example-00000001>AGI Tx >> agi_language: en 
<SIP/example-00000001>AGI Tx >> agi_type: SIP 
<SIP/example-00000001>AGI Tx >> agi_uniqueid: 1435426730.1 
<SIP/example-00000001>AGI Tx >> agi_version: 13.2.0 
<SIP/example-00000001>AGI Tx >> agi_callerid: example 
<SIP/example-00000001>AGI Tx >> agi_calleridname: unknown 
<SIP/example-00000001>AGI Tx >> agi_callingpres: 0 
<SIP/example-00000001>AGI Tx >> agi_callingani2: 0 
<SIP/example-00000001>AGI Tx >> agi_callington: 0 
<SIP/example-00000001>AGI Tx >> agi_callingtns: 0 
<SIP/example-00000001>AGI Tx >> agi_dnid: 2600 
<SIP/example-00000001>AGI Tx >> agi_rdnis: unknown 
<SIP/example-00000001>AGI Tx >> agi_context: demo 
<SIP/example-00000001>AGI Tx >> agi_extension: 2600 
<SIP/example-00000001>AGI Tx >> agi_priority: 2 
<SIP/example-00000001>AGI Tx >> agi_enhanced: 0.0 
<SIP/example-00000001>AGI Tx >> agi_accountcode: 
<SIP/example-00000001>AGI Tx >> agi_threadid: 140718795228928 
<SIP/example-00000001>AGI Tx >> 
<SIP/example-00000001>AGI Rx << verbose "Failed to execute '/var/lib/asterisk/agi-bin/agiscript.php': No such file or directory" 1 
agiscript.php: Failed to execute '/var/lib/asterisk/agi-bin/agiscript.php': No such file or directory 
<SIP/example-00000001>AGI Tx >> 200 result=1` 
+0

解決:) :) :) :) – user0946076422

回答

0

這意味着文件包括其他文件或lib,這是不可從該目錄訪問(可能不完全路徑使用)

相關問題