[asterisk-users] CALLS NOT HANGING UP THROUGH AGI

Joshua Colp jcolp at digium.com
Mon Feb 13 16:43:38 CST 2017


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



More information about the asterisk-users mailing list