我的拨号计划是这样的
[dial-plan]
exten => s,1,Answer()
exten => s,n,Noop(exten = ${EXTEN}
exten => s,n,Macro(dumpvars)
exten => s,n,Macro(record-enable)
exten => s,n,AGI(success.php)
exten => i,1,Noop(REASON = ${REASON})
exten => i,n,Macro(dumpvars)
exten => i,n,AGI(faile.php)
exten => failed,1,Noop(REASON = ${REASON})
exten => failed,n,Macro(dumpvars)
exten => failed,n,AGI(faile.php)
我想从faile.php调用的位置捕获,它可以从
failed
或i
调用。我怎么查这个我要把它做成faile.php
if($some_var == 1){
//Invalid
}
elsif($some_var == 2){
//Failed
}
最佳答案
agi将使用一些标准参数调用,包括从扩展调用(在您的情况下,将是i
或failed
)。确保正在解析传递给脚本的参数(通过stdin)!