简体   繁体   English

星号phpagi返回繁忙

[英]asterisk phpagi returns busy

Right now, I'm having my script to not pick up a call, but on their end, it retries 3 times so my asterisk server gets hit 3 times. 现在,我的脚本无法接听电话,但最终,该脚本重试3次,因此我的星号服务器被命中3次。 How do I may return a busy signal rather than not answering a call? 如何返回忙音而不是不接听电话? or any other way to prevent their client end from hitting my server 3 times for each call I don't have my agi script answering the call? 还是其他任何方法可以防止他们的客户端每次呼叫打到我的服务器3次我没有agi脚本来接听电话?

Here is part of my script 这是我脚本的一部分

  require_once('phpagi.php');

  $agi = new AGI();
  //$agi->answer();


stuff here

$agi->hangup();

There are 2 variants: 有2种变体:

1) 1)

$agi->exec("Busy","");

2) Answer before hangup(if prevous not help). 2)挂断电话前回答(如果不方便)。

Ok. 好。 You don't need an AGI for this. 为此,您不需要AGI。 You can use "GosubIf" to test if a call has the same caller ID as your annoyance caller. 您可以使用“ GosubIf”来测试呼叫是否与烦扰呼叫者具有相同的呼叫者ID。 Then, use this code: 然后,使用以下代码:

[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()

... much simpler and gets your job done. ...更加简单,即可完成工作。 See: http://www.voip-info.org/wiki/view/Asterisk+cmd+Busy for more information 有关更多信息,请参见: http : //www.voip-info.org/wiki/view/Asterisk+cmd+Busy

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM