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. 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?
Here is part of my script
require_once('phpagi.php');
$agi = new AGI();
//$agi->answer();
stuff here
$agi->hangup();
There are 2 variants:
1)
$agi->exec("Busy","");
2) Answer before hangup(if prevous not help).
Ok. You don't need an AGI for this. You can use "GosubIf" to test if a call has the same caller ID as your annoyance caller. 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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.