Hi Everyone, I am dealing with a problem for now and its really annoying. I want to hangup calls from AGI but it seems that my AGI is not rejecting the calls properly. { $agi->verbose("number-not-in-service"); $agi->exec("Congestion","1"); $agi->hangup(); exit; } with the above logic, all of my calls should be rejected and should be disconnected instantaneously. But this doesn't seem to be happening, in asterisk CLI I can see that AGI is executing multiple times. Can anyone tell what I am doing wrong? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170214/bb4a801f/attachment.html>
On Mon, Feb 13, 2017, at 05:46 PM, Anas Moiz wrote:> Hi Everyone, > > I am dealing with a problem for now and its really annoying. > > I want to hangup calls from AGI but it seems that my AGI is not rejecting > the calls properly. > > { > $agi->verbose("number-not-in-service"); > $agi->exec("Congestion","1"); > $agi->hangup(); > exit; > } > > with the above logic, all of my calls should be rejected and should be > disconnected instantaneously. > > But this doesn't seem to be happening, in asterisk CLI I can see > that AGI is executing multiple times. > > Can anyone tell what I am doing wrong?Is this SIP? If so what may be happening is that the system sending you calls may not consider a 503 Service Unavailable (which Congestion will send) to be a final response which terminates the call and thus send you a call again, and again, and again, in hopes that you'll accept it. Since that is behavior of the system sending you calls you would need to determine if there is any SIP response which will provide the behavior you need and then find the appropriate cause code to cause it to be sent. -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
Yes Joshua, Its SIP and but the problem is I have tried everything but it doesn't seem to work. In the SIP Trace I can see that I am sending 503 Service Unavailable as a response. You can check the SIP trace attached below: 162.243.107.173:5060 -> 66.226.76.70:5060 SIP/2.0 503 Service Unavailable Via: SIP/2.0/UDP 66.226.76.70:5060;branchz9hG4bK643.e44ea565.0;received=66.226.76.70;rport=5060 Via: SIP/2.0/UDP 74.117.36.136;received=74.117.36.136;rport=5060;branch=z9hG4bKHBe9cmy3QX2Se From: <sip:2126555763 at 66.226.76.70:5060>;tag=5H54caUKre8gc To: < sip:12023300643 at 162.243.107.173:5060>;tag=as61c328a0 Call-ID: 15-8824754a-f58560c9-335bcd48-45558f71 CSeq: 103180201 INVITE Server: user_Anas Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Length: 0 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170214/c2a52590/attachment.html>