现在,我正在让我的脚本不接听电话,但最后,它重试了3次,因此我的星号服务器被点击了3次。如何返回忙音而不是接听电话?或任何其他方式防止他们的客户端每次呼叫3次点击我的服务器我没有我的agi脚本接听电话?
这是我的剧本的一部分
require_once('phpagi.php');
$agi = new AGI();
//$agi->answer();
stuff here
$agi->hangup();
答案 0 :(得分:0)
有两种变体:
1)
$agi->exec("Busy","");
2)在挂断前回答(如果没有帮助)。
答案 1 :(得分:0)
确定。您不需要AGI。您可以使用“GosubIf”来测试呼叫是否与您的烦人呼叫者具有相同的呼叫者ID。然后,使用以下代码:
[no_one_home_but_us_chickens]
exten => s,1,Answer ; can't Playtones unless we answer first
same => n,Playtones(busy) ; send the audio sequence that humans understand means "busy"
same => n,Busy(10) ; signal the other end that the line is busy.
same => n,Hangup()
same => n,Return()
......更简单,让你的工作完成。 有关详细信息,请参阅:http://www.voip-info.org/wiki/view/Asterisk+cmd+Busy